Study Guide


Midterm Exam: Thursday, March 20, 2014

The exam will be in class, and you will have 75 minutes to complete it. It will be closed book, closed notes, closed calculators, 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.

  1. the main components of a computer system
  2. internal representation of information in a computer... bits, bytes, words, binary
  3. the fetch/execute cycle
  4. the storage speed vs. cost vs. capacity pyramid (slow cloud to fast ram)

  5. data types: numeric, string, boolean
  6. constants
  7. variable declaration... creating storage in your program
  8. basic arithmetic expressions on numeric data
  9. operator precedence rules (PEMDAS)
  10. assignment... storing values in variables
  11. comparison of data values (less than, greater than, less than or equal, equal, not equal, etc.)
  12. boolean operators (and, or, not)

  13. input via prompt statement
  14. output via alert statement
  15. for loop
  16. while loop
  17. conditional statements: if-then, if-then-else, if-then-else-if-else-if-else (cascade), switch
  18. creating and using arrays

  19. function definition
  20. function calls
  21. passing parameters into functions
  22. passing information back from a function with the return statement
  23. scope rules ... what names are visible where
  24. global vs. local scope

  25. understand all your bricks
  26. variables used as counters (with addition, with multipication)
  27. variables used as accumulators (with addition, with multipication)
  28. generating random numbers
  29. Math object functions we have used (sqrt, floor, round, random)
  30. other functions: isNaN, Number
  31. understand the basic algorithms we study (like binary search, linear search, sieve of eratosthenes)

  32. simulated execution of a program, organizing the variable value changes with memory maps (tables)

  33. basic software development habits: write a few lines of code, compile, test, make sure it works before adding more lines
  34. grow your program, dont write it
  35. always have a working version
  36. input data validation
  37. design your algorithm to start... your first working version is a program of mostly comments that indicate what major activities to do in what order