CSSE 220 – Object-Oriented Software Development

Homework 11

Objectives

Prepare for exam. Practice Class Design.  Finish Game Of Life Porgram

Tasks

  1. Complete the assigned reading for the next session: §10.6–10.11. As you read, see if you can answer the self-check questions and review exercises. If there is something you do not understand, make note of it so you can ask about it.
  2. Take the ANGEL quiz over the reading.
  3. Written exercises: (9 points) Work with your Game of Life partner(s).  You may write your answers to these questions neatly on paper, or type and print your answers if you prefer. Sketches can be done on paper, or using a drawing program of your choosing. (I suggest the former unless you already know a drawing program well.)
    1. Suppose you were going to implement a program to let two people play chess against each other. Think about what classes you would need. (Search on-line to find the rules of chess if you aren’t familiar with the game.) List all the classes that you can think of that might be useful in implementing your program. For now you can assume that users will enter moves in the console, but you’ll display the board in a graphics window.
    2. From your list of potential classes, decide which ones you would use in an actual implementation. Pay particular attention to the rules for good classes that we discussed in class. Sketch a UML class diagram for these classes. Show the public interface (including the arguments of the methods) of each class and the dependency relationships between the classes. Recall that dependency relationships are indicated by dashed lines with open arrow heads.
    3. Write a couple of paragraphs explaining why you chose the classes that you did for your design. Discuss the cohesion and coupling of your classes.
  4. Programming
    1. (5 points) In the ChessDesign project in your shared SVN repository (check it out), create classes based on your design for Chess. Create constructor and method stubs (without bodies)f or your design and add javadocs. You do not have to write bodies for the constructors and methods at this time, though you may do so if you find that interesting.   Commit your stubbed classes to the repository.
    2. Finish the Game of Life program (pair) and fill out the partner survey on ANGEL (individual).  If you have two partners, please submit the survey once for each partner.

Turn-in Instructions

We will grade your reading quiz using ANGEL. Turn-in your programming work by committing it to your SVN repository, and the written problem at the beginning of Session 13 class.  Be sure that everyone's name is on the written part (unless not everyone worked on it).