Project 1: Freecell

How should I attack such a large programming project?

I recommend running the example code and reading the code to see how it works. Try modifying the example code to see if your understanding is correct.

In class, we talked about the Model-View-Controller design pattern. Try to classify each class in the given code into one of those three categories. Then, look at each component (Model/View/Controller) separately. Draw a picture that shows how the components interact.

Another useful illustration is to draw the GUI and label the pieces with their class name. Then, label how the pieces interact. This drawing is a more concrete look at the model/view/controller that may not be as complicated by, for example, Java interface classes.

Then, I would start with the model code. Determine what the model code has and what you will have to add to the code. Initially, just write empty or very simple methods to make sure that you have the high-level interfaces correct.

Then, return to your picture of how the view and controllers interact with the model. Extend the view and/or controller to use the model's methods. Again, I would write empty methods to make sure the interfaces between the components are correct.

Of course, as you develop your code, you may need to go back and revise model methods to ease interaction with the view or controllers. Make sure you test these methods outside of the GUI to isolate model problems from GUI issues.

Any other advice?

Write only 5 lines of code at a time. Compile the code and run it. This disciplined process will make debugging easier in the long run.

Test individual Model methods outside of the GUI so that you can isolate model problems from GUI problems.