Project 2a

Due Date: Thu 25 Oct

Pair Project


An understanding of
  • object-oriented modeling and design
  • SOLID and other design principles
  • basic design patterns
Note: this is a modeling and design project. Nevertheless, you should use all available spare time to practice as much coding as you can.


In this and several subsequent projects, you will design and implement a simple mobile adventure game. Your first job is to design the type (class and interface) hierarchy for the game. There will be
  • actors such as players, dangerous monsters, and harmless creatures
  • location cells such as land, water, swamp
  • fixtures such as bridges, trees, furniture
  • smaller objects such as snacks, handguns, flashlights, pliers, cell phones
The terrain is put together from location cells, and actors can move from a cell to an adjacent cell.

Start by asking yourselves design questions such as these:
  • What, if anything, do the various smaller objects have in common? What would be a good way to capture this commonality? Is this a permanent or temporary commonality?
  • Are players related to or associated with small objects? If so, how? Are these permanent or temporary associations?
  • Are location cells related to or associated with actors, fixtures, and other objects? If so, how? Are these permanent or temporary associations?
  • Are location cells related to or associated with each other? If so, how? Are these permanent or temporary associations?
Then express your insights in the form of a detailed class diagram. Where appropriate, distinguish between interfaces, abstract classes, and concrete classes. Include methods and properties but not instance variables. Indicate relationships such as generalization, composition (in the general sense), and other associations. Try to follow the design principles discussed in class.

You have the same choices for creating your diagram as in project 1b.


  • Be sure to use a non-proprietary format for your diagram by exporting to, say, PDF or PNG.
  • Place your diagram in the doc folder within your project. (You will add source code later.)
  • Push your project to a repository named project2.
  • Summarize your findings (answers to the questions embedded in the code) in the top-level README file of the repository.
  • Let the instructor (laufer) and the TA (ejburns) know by email that your work is ready to be graded.

Grading Criteria

  • 0.5 Actor class
  • 0.25 two or more subclasses
  • 0.5 Location class
  • 0.25 two or more subclasses
  • 0.5 Fixture class
  • 0.25 two or more subclasses
  • 0.5 SmallObject class 
  • 0.25 two or more subclasses
  • 0.5 Actor carries zero or more SmallObject (aggregation)
  • 0.5 Location borders zero or more Location (aggregation)
  • 0.5 Location contains zero or more Fixture (aggregation)
  • 0.5 Location contains zero or more SmallObject