Home-->Lab-sessions-->Week-7
 

Designing classes

Aim

To understand and apply important concepts of object oriented design such as coupling, cohession and responsibility-driven design.

The class design exercise

The exercise focuses around analysing the design quality of a version of the World-of-Zuul game. Below you can see a class diagram of the program and this is the code for the relevant classes of the exercise (Game and Room).

Try to re-design these classes (Game and Room) applying design concepts such as loose coupling, high cohession and responsibility-driven design. You may refer to Lecture 6 slides for some ideas.

  • Download the starting program (Zuul-bad) and try to make it better!

  • Last updated at 8:59pm, Thursday September 22nd 2011
    Dr Natalia Beloff (N.Beloff@sussex.ac.uk)