Exercise 2 Answer
Exercise 2 Answer
Design Pattern
Exercise 2
1. The design class diagram shown in Figure 1 is about the design of game software. In this
design, the SlowGameFactory class is responsible for creating the SlowFighter object and the
SlowMonster object, and returns the created object as a superclass to the ClientGUI object. The
ClientGUI object then manipulates the SlowFighter object and the SlowMonster object so that
they fight each other.
Question:
a) What design pattern does the below design use?
b) Add four new classes MedFighter, SuperFighter, MedMonster, and SuperMonster to the
below design class diagram to make the MedFighter object can correspond to the MedMonster
object and the SuperFighter object can correspond to the SuperMonster object. Draw new design
class diagram;
Exercise 2