Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

Describe ethics training.

Answered: 1 week ago