The final exam will have approximately 5-8 questions from a subset of the following topics:

  • standard Java methods such as equals, hashCode, toString, clone, and compareTo/Comparators
  • inheritance and subtyping (given a problem situation, where should/shouldn't inheritance be used? interfaces, abstract classes, etc.)
  • class design and OO design heuristics (examining a problem statement and determining what classes/methods should be used)
  • specifications with Javadoc commenting
  • programming by contract (preconditions, postconditions, invariants, assertions)
  • writing a JUnit test class to test a given piece of code
  • design patterns including Iterator, Adapter, Singleton, Flyweight, Prototype, Factory Method, Composite, Decorator, Observer, Strategy, State, Memento
  • making classes immutable
  • generics and parametric polymorphism (given a set of constraints, what is the right set of generic types/syntax to use?)
  • GUIs with AWT/Swing, including events and 2D graphics (due to the large number of classes and APIs in AWT/Swing, we'll have only a limited amount of questions about this area)
  • Java keywords and other features (enum, reflection, annotations, exceptions, etc.)

The following topics are guaranteed NOT to be tested on the final exam:

  • JAR archives
  • packages
  • threads, timers, concurrency
  • esoteric event types such as FocusListener, WindowListener, etc.
  • other design patterns not listed or not covered in class

You may bring your textbook and any other written/printed materials you like (such as your notes, lecture slide printouts, books, etc.). We may bring one copy of the course textbook for you to look at, but you shouldn't rely on this.