Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

39 Job evaluation methods.

Answered: 1 week ago