Wednesday, December 2, 2009

Final Exam Practice Questions

As mentioned in class, the final is on Friday December 11 @ 2:00pm (to 5:00pm) in our classroom. It will be just like all the other tests: open book, no computers. The test will focus a bit more on the first chapters as these deal with the basic of all programming languages: variables, loops, methods, arrays, etc. Below are links to some practice questions. I also recommend you do all the programming exercises from the textbook. Like I said the first day, the only way to learn to program is by programming, a lot. Have fun with these!
  1. Write a method that finds a given number in a sorted array.
  2. Write a method that returns an array with the first n Fibonnaci numbers.
  3. Write a method that takes as input a 3x3 array of integers and returns true if that array is a magic square.
  4. Implement a simple 1-dimensional automata.
  5. Once your 1D automata works, try working an a simple 2D automata.
  6. Write a method that prints out a simple distribution graph.
  7. Implement a class that limits the number of instances of itself to 4.
  8. Write a method that reverses an array in place.

No comments: