Write Java program that involves solving problems using OOP principles that include inheritance and use of arraylists.
Question:
Write Java program that involves solving problems using OOP principles that include inheritance and use of arraylists. Deliverable: GameType.java that I provided for your use. Game.java for the utility class that defines a Game inherited from the GameType class TestGame.java for the test classes that defines objects and shows the functionality of the class in addition to any other requirements Compress all source files into one ZIP/7z/rar file. Process: Download the provided file that shows usage of a class that includes the description of any game (GameType.java) into a folder where you will write the program for this exercise. Write the definition of the class named Game that inherits from GameType.
The Game class will have the additional private attributes of minimum size of RAM (in gigabytes) required to play the game, the minimum size of hard drive space (in gigabytes) required to install the game, and the minimum CPU speed (in GHz). Code a constructor with no arguments Code a constructor with arguments Code a toString method Provide the appropriate GETTER and SETTER methods Define an ArrayList of Strings to hold the description of as many games as the user would like to enter Display the contents of the ArrayList in reverse order Make a test class to thoroughly test your utility class. Make sure to allow for user input as you test your code. Create various objects and show how methods are utilized. Sample Interaction - I created a total of 3 Games (Game objects) for this sample run Display the game created with the no-arg constructor: Description : A Game of Thrones Minimum Ram = 8.0GB Minimum Free Drive Space = 12.5GB Minimum CPU Speed = 4.2GHz This is to test created from user using the constructor with args Enter the description for your game : NBA 2K Enter the minimum RAM required to play your game (GB): 3.8 Enter the minimum free drive space required to play your game (GB): 12 Enter the minimum CPU speed required to play your game (GHz): 5 Display the game created with the parametrized constructor: Description : NBA 2K Minimum Ram = 3.8GB Minimum Free Drive Space = 12.0GB Minimum CPU Speed = 5.0GHz
*** Testing game with data provided by the user Enter the description for your game : Madden 2022 Enter the minimum RAM needed for your game : 2 Enter the minimum free drive space needed for your game : 10.5 Enter the minimum CPU speed needed for your game : 3.8 Display the output for the third game using the setter methods Description : Madden 2022 Minimum Ram = 2.0GB Minimum Free Drive Space = 10.5GB Minimum CPU Speed = 3.8GHz How many Game descriptions would you like to enter? 3 Enter the description of the game: Soccer 2022 Enter the description of the game: MineCraft 2.0 Enter the description of the game: A game for Teens Game description for games enetered by user in reverse order A game for Teens MineCraft 2.0 Soccer 2022
GameType.Java
/class GameType with one attribute public class GameType { private String description; public GameType(String d) { description = d; } public String getdescription() { return description; } public void setDescription(String d) { description = d;; } public String toString(){ return "Game Description = " + description; } }//class Game
Business Communication Essentials a skill based approach
ISBN: 978-0132971324
6th edition
Authors: Courtland L. Bovee, John V. Thill