Question: JAVA question: Consider an adventure game in which players live in a two-dimensional grid. Each grid element can be considered to be a room in

JAVA question:

Consider an adventure game in which players live in a two-dimensional grid. Each grid element can be considered to be a room in the world and each room can have things in it (treasure, food, tools, etc) as well as players. There can be different players in the world (user controlled, computer controlled, etc).

Outline the various classes and interfaces (if any) that you would design for this game. Specify which classes are abstract and which are concrete. Provide an API for each class. The API should consist of a list of public methods that the class has. You do not have to mention attributes or private/protected methods.

Draw simple UML class diagrams for the classes/interfaces in your game. That is, draw a box for each class (identifying if it is absbtact or an interface) and show any inheritance (extending a class or implementing an interface) with an arrow.

You must consider the world itself, players in the world, rooms in the world, and several things that can also be in the world that include food, treasure, and tools. For something like food, there should be food that is good for a player and food that is bad (poison). 80% of this problem will be for designing classes (using OOP principles) for the basics described above. The remaining 20% will be allocated for going for going beyond this.

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!