CSci 2101 Lab 4. Programming with Java classes.

We will be implementing a 2-player game of War.

Starts Tue Feb 14th in the lab, will continue for the following week.

Tentatively: 50 points

The first two parts of the lab are done in pairs, the rest in groups of 3 or 4.

Part 0: finish the Person class

We will finish the Person class that we looked at on Monday.

Part 1: writing the Card class

Design and implement the Card class according to the tests. This will be done all together, the "Coding Dojo" style.

Part 2: figure out other classes needed for the game.

Every group proposes classes and their key methods. Then the sketch of the solution is written. This will also be done all together.

Part 3: implementing the needed classes.

Every group implements and tests their classes. Make sure to put your names in comments so that other groups know who the authors are in case something needs fixing or tweaking.

Please pay attention to the methods' specification. If anything is unclear, verify it with the relevant group or groups. Failure to follow the specification and failure to communicate when such communication is needed will result in a lower grade.

Part 4: testing another group's code.

Groups that are done with their code will test other groups' methods. If a problem is discovered, contact that group and work with them on fixing the issue.

Part 5: putting it all together and final debugging.

The code is put together. Necessary final tweaking is done.

Part 6: enjoy the game!

Eclipse resources:

How to submit:

Send me all of the code you worked on at the end of the lab (CC your group). The lab grade is based on in-class activities and the code sent to me at the end of the lab (or, if final, incorporated into the solution).


CSci 2101 course web site.