Question: Create an abstract class named Game with the following attributes: game _ ID ( int ) , game _ Genre ( String ) , game

Create an abstract class named Game with the following attributes: game_ID (int), game_Genre (String), game_Specs (ArrayList of type Game_Specs) and game_Price (double), where the game_ID is a unique identifier that starts from the value (your_student_id) and autoincrements with each creation of a new child object of the Game class.
Create the Game_Specs class with the following attributes: name(String), numberOfPlayers(int), and date_created(LocalDate). Create the Setters and Getters for all attributes. In addition, implement an appropriate toString() method for the Game_Specs class. (5 Marks)
Create the Setters and Getters for all of the Game attributes except the setter for the game_ID. In addition, create an abstract method name: getGameDescription() that returns a String that describes the game in terms of its attributes. (5 Marks)
Create two child classes of the Game class. These are: Puzzle_Game and Action_Game. Override the getGameDescription() method in each of the child classes. (4 Marks).
In the main method of the Game class, create an ArrayList of Game objects and add two object to the list. The first object is an instance of the Puzzle_Game, and the second object is an instance of the Action _Game. (3 Marks)
Draw a UML diagram that shows the classes, their attributes and methods, and the relationships that link them. (3 Marks)
Upload your solution (in addition to the UML diagram) through Moodle, in one compressed file (your _name_yourID.zip)

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!