Programming Assignment #4.
Added on - 16 Sep 2019
Programming Assignment#4Role Playing GameYou are part of a team working on a new role playing game. Your part is to design and create theclasses 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. Foreach class, come up with suitable methods based on the type of object. You also are to create aprogramcalledAssignment4thattests the objects in a new role playing game.You are to designa classto represent each type of game object.All objectsshould have fields forthe following data:namelocationThe stationary objects (rooms, trees and walls) are game objects andshould haveadditionalfieldsfor the following data:damagePointsThe collectable objects (coins, weapons, and health potions) are game objects andshould haveadditionalfields for the following data:valuetype (an enum with choices such COINS, HEALTH_POTION, AXE, SWORD, MACE,MAGIC_WAND, BOMB)The moveable objects are game objects andshould haveadditionalfields for the following data:healthdirectionspeedThe bad guy objects (zombies and aliens) are moveable objects andshould haveadditionalfieldsfor the following data:meanFactordefeatPointsThe good guy objects (warriers, wizards, and hobbits) are moveable objects andshould haveadditionalfields for the following data:strengthintelligencebackPack (ArrayList of collectable objects)Themainprogram(aka test program)shouldbuildan ArrayList ofstationaryobjectsand anArrayList of moveable objects.It should build an ArrayList of collectable objects for each goodguy’s backpack. The main program should go through all objects in each ArrayList and call theircommon methods (e.g., display(), move(), fight(), etc.).