Question: Objective: Write a program in which the user can: Read a video game collection file. The file is assumed to have the name and the

Objective:

Write a program in which the user can:

Read a video game collection file. The file is assumed to have the name and the console and its tab delimited. It is advisable to put each of the games in a Linked List (Of your creation not an ArrayList or other list structure built into Java) since number of games is not known.

Search the contents of the file that has already been loaded in from part 1. The user enters the name of the game and then the name of the console.

Matches for the game and console entered are returned

Partial matches for the name or console are acceptable

This is not case sensitive

User may use the character * to indicate they want all games or consoles.

Print out the current search results to the console

Print out the current search results to a new file with the option to append to said file. The user must specify the name of the file and whether or not they append.

Keeps running this until the user quits

Suggested Methodology

You can solve this in any number of ways, and heres a way you may take to approach this problem.

3 Classes

VideoGame: A simple class that represents one video game. It only has the name of the game, and the console of the game

GenericLinkedList: Should be similar to the one described in class.

VideoGameCollectionManager: This class has a linked list which is populated by reading from a tab delimited file. The first item in the file is always the name and the second is always the console. This class also handles printing to files where a file name, whether or not to append, and an external linked list of games is passed in via parameters. Finally this class has a method that returns a linked list of video games based on a search criterion (name and console). Partial matches are accepted, the case can be ignored, and the * is used to return all games or consoles.

VideoGameCollectionFrontEnd: This is the where the user inputs commands and sees the results. It also holds a linked list of the results of the most recent search.

Example Dialog:

Welcome to the video game database!

Enter 1 to load the video game database

Enter 2 to search the database

Enter 3 to print current results

Enter 4 to print current results to file

Enter 0 to quit

1

Enter the file name JJCollection.txt

Enter 1 to load the video game database

Enter 2 to search the database

Enter 3 to print current results

Enter 4 to print current results to file

Enter 0 to quit

2

Enter the name of the game or '*' for all names Super

Enter the name of the console or '*' for all consoles Nintendo

Super Alfred Chicken Super Nintendo [NA]

"Super Aquatic Games Starring the Aquabats, The" Super Nintendo [NA]

Super Castlevania IV Super Nintendo [NA]

Super Dodge Ball Nintendo Entertainment System [US]

Super Empire Strikes Back Super Nintendo [NA]

Super Ghouls 'N Ghosts Super Nintendo [NA]

Super Glove Ball Nintendo Entertainment System [US]

Super Mario All-Stars Super Nintendo [NA]

Super Mario Bros. (5 Screw Cartridge) Nintendo Entertainment System [US]

Super Mario Bros. / Duck Hunt (No Nintendo Seal of Quality) Nintendo Entertainment System [US]

Super Mario Bros. 2 (No Nintendo Seal of Quality) Nintendo Entertainment System [US]

Super Mario Bros. 3 (Bros. above Mario's Head) Nintendo Entertainment System [US]

Super Mario Kart Super Nintendo [NA]

Super Mario World Super Nintendo [NA]

Super Mario World 2: Yoshi's Island Super Nintendo [NA]

Super Metroid Super Nintendo [NA]

Super Noah's Ark 3D Super Nintendo [NA]

Super Pitfall (3 Screw Cartridge) Nintendo Entertainment System [US]

Super Punch-Out!! Super Nintendo [NA]

Super Scope 6 Super Nintendo [NA]

Super Spike V'Ball / Nintendo World Cup Nintendo Entertainment System [US]

Super Star Wars (JVC) Super Nintendo [NA]

Super Star Wars: Return of the Jedi (JVC) Super Nintendo [EU]

Super Street Fighter II Super Nintendo [NA]

Super Team Games Nintendo Entertainment System [US]

Super Tennis Super Nintendo [NA]

Enter 1 to load the video game database

Enter 2 to search the database

Enter 3 to print current results

Enter 4 to print current results to file

Enter 0 to quit

4

Enter the file name to print out. superGames.txt

Append to file? True or false. false

Enter 1 to load the video game database

Enter 2 to search the database

Enter 3 to print current results

Enter 4 to print current results to file

Enter 0 to quit

0

Goodbye

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!