Note: These files have the comments and the test main()s removed to fit on one page.

Class Dependency Diagram
There is an arrow from class B to class A if

  • class B calls a method of class A
  • class B accesses a field of class A
  • class B extends class A
  • class B contains a reference to class A

To Do: Get in a group of three, draw the class dependency on the whiteboard (BIG!), and label each edge with what the dependency is, i.e. with the reason(s) from the above list for the dependency being there. If there are method calls for field accesses, give the names of the methods/fields.

The Point: The annotated class dependency diagram is a great starting point. It captures the design of a program. So from now on, when you have code to write, sit down and come up with a plan like this before you start coding!