Write a program to monitor a game shop's stock in JAVA. The different games should be broken down into several classes (INHERITANCE in action). Name and a special ID will both be present in the parent game class. ID must be larger than 0, and Name cannot be left empty. PC games will have a child class with additional features for the operating system (Windows, Apple, or Linux), minimum memory needs (1 MB - 15 MB), and disk minimum requirements (10 MB - 100 MB). Video games that are played on gaming consoles will have a second child class. It will have additional attributes of platform name(Xbox or PlayStation). This can be either String or enumerated type. Consoles will also have a version number. For PlayStation, 3, 4, or 5 are valid. For Xbox, One, Series X, or Series S are valid. Finally, a third child class for mobile gaming apps will contain additional attributes for mobile device type (Apple or Android) and version number of the device. No validations required on version number for mobile devices. You should use polymorphism and abstract methods/classes to simplify this program. Your program will begin by reading a text file (created by you, in a format designed by you) with a minimum of two games per type (a total of six, 2 PC, 2 console, 2 apps) to create a list (think ArrayList) of the games in inventory. Display the library list in a user friendly format, ask if the user would like to find or delete a game by id number. When user is done viewing and deleting, save the changed list back to the original text file (overwriting it).
Write a
You should use polymorphism and abstract methods/classes to simplify this program.
Your program will begin by reading a text file (created by you, in a format designed by you) with a minimum of two games per type (a total of six, 2 PC, 2 console, 2 apps) to create a list (think ArrayList) of the games in inventory. Display the library list in a user friendly format, ask if the user would like to find or delete a game by id number. When user is done viewing and deleting, save the changed list back to the original text file (overwriting it).
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images