Question: Suppose that you are creating an object-oriented design for a 2D arcade game. Everything on the screen is a game object and has a height

Suppose that you are creating an object-oriented design for a 2D arcade game. Everything on the screen is a game object and has a height and width. Some game objects are capable of moving and some are capable of shooting - these behaviours are independent of one another. So there are: - 
  • Stationary, non-shooting game objects -
  • Moving, non-shooting game objects -
  • Stationary, shooting game objects -
  • Moving, shooting game objects 
Different game objects can shoot and move in different ways. For example, in the case of moving objects there are vertically moving objects and horizontally moving objects. 
  1. Give two different designs which model this scenario. For each design provide a UML class diagram and a brief description which clearly explains your approach.
  2. Compare your two designs by describing their advantages and disadvan a justification for the one that you would ultimately choose. and provide

Step by Step Solution

3.43 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The answer provided below has been developed in a clear step by step manner Step 1 In this design we have an abstract base class called GameObject whi... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Operating System Questions!