CS7 Exam 3 - Review Sheet


Exam 3 is the final exam for the course.  It is comprehensive, but weighted slightly towards some of the untested material.  Thus, about 50% of the exam will cover material from chapters 1 through 4 in JBD, and the rest will cover the material since exam 2, namely chapters 5 and 10.  Not all tested material will be from the book, of course.

My advice is to go back over everything - the exams, assignments, class notes, projects, book, labs, etc.  Just refresh your memory on things, and figure out things that didn't make sense in the past.  You will probably be surprised at how easy the first exam looks now.  Just make sure you can do those problems again. 

Here are a few review questions that you could practice with:
As in the previous exams, you will see questions falling under three categories:  conceptual, read code, and write code.  The problems above are fairly representative, as are the first two exams.  Writing code is the hardest part, so here are  a few more for you to try.  These cover only the new material.

  1. Write a method that takes in an array of doubles and returns how many are between 0.0 and 0.5.
  2. Declare and allocate an array of 100 booleans.  Write a for loop that loads all even numbered locations with false, and odd numbered locations with true.
  3. Declare an array of 10 integers initalized to the multiples of 5, starting with 5.  Use the java bracket notation to do this initialization.
  4. Write a code segment that will read lines in from the user and write each of those lines to a file called output.txt.  Make sure you do the proper declarations.  Do not worry about exceptions.
  5. Write a method that accepts an array of integers, a lower index, and an upper index, then returns the average of the numbers between (and including) the values at those indices. 
Good luck studying - feel free to ask any questions in class or via email.  I will also be holding my office hours TW 11-12:30 of finals week.


last modifed 4/14/04, by hcl