Question: Using Java You are part of a team working on a new role playing game. Your part is to design and create the classes for

Using Java

You are part of a team working on a new role playing game. Your part is to design and create the classes for the hierarchy of game objects (such as trees, walls, zombies, aliens, and good guys. You are to draw a complete class diagram that shows the entire hierarchy of your classes. For each class, come up with suitable methods based on the type of object. You also are to create a program called Assignment4 that tests the objects in a new role playing game.

You are to design a class to represent each type of game object. All objects should have fields for the following data:

name

location

The stationary objects (rooms, trees and walls) are game objects and should have additional fields for the following data:

damagePoints

The collectable objects (coins, weapons, and health potions) are game objects and should have additional fields for the following data:

value

type (an enum with choices such COINS, HEALTH_POTION, AXE, SWORD, MACE, MAGIC_WAND, BOMB)

The moveable objects are game objects and should have additional fields for the following data:

health

direction

speed

The bad guy objects (zombies and aliens) are moveable objects and should have additional fields for the following data:

meanFactor

defeatPoints

The good guy objects (warriers, wizards, and hobbits) are moveable objects and should have additional fields for the following data:

strength

intelligence

backPack (ArrayList of collectable objects)

The main program (aka test program) should build an ArrayList of stationary objects and an ArrayList of moveable objects. It should build an ArrayList of collectable objects for each good guys backpack. The main program should go through all objects in each ArrayList and call their common methods (e.g., display(), move(), fight(), etc.).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!