Study Guide
Midterm Exam: Wed., Oct. 15, 2014
The exam will be in class, and you will have 50 minutes to complete it.
It will be closed book, closed notes, closed calculators, closed laptops,
closed cell phone, and closed class mates during the exam.
Here is a list of topics that you should be able to explain or
use in a program.
Understanding these topics well will help you
do well on the exams.
This is a guide, not a guarantee. I intend for it to help you,
but questions on the exam can come from any material we have
studied in this class.
- the main components of a computer system
- internal representation of information in a computer...
bits, bytes, words, binary
- the fetch/execute cycle
- the storage speed vs. cost vs. capacity pyramid (slow cloud to fast ram)
- data types: numeric, string, boolean
- constants
- variable declaration... creating storage in your program
- basic arithmetic expressions on numeric data
- operator precedence rules (PEMDAS)
- assignment... storing values in variables
- comparison of data values (less than, greater than,
less than or equal, equal, not equal, etc.)
- boolean operators (and, or, not)
- input via prompt statement
- output via alert statement
- for loop
- while loop
- conditional statements: if-then, if-then-else,
if-then-else-if-else-if-else (cascade), switch
- function definition
- function calls
- passing parameters into functions
- passing information back from a function with the return statement
- scope rules ... what names are visible where
- global vs. local scope
- understand all your bricks
- variables used as counters (with addition, with multipication)
- variables used as accumulators (with addition, with multiplication)
- Math object functions we have used (sqrt, floor, round)
- other functions: isNaN, Number
- understand the basic algorithms we study (like binary search)
- simulated execution of a program, organizing the variable value
changes with memory maps (tables)
- basic software development habits: write a few lines of code,
compile, test, make sure it works before adding more lines
- grow your program, dont write it
- always have a working version
- input data validation
- design your algorithm at the start... your first working version
is a program of mostly comments that indicate what major
activities to do in what order