Answered step by step
Verified Expert Solution
Question
1 Approved Answer
To create and work with linked chains of nodes Objectives To create and work with linked chains of nodes To create a component of score
To create and work with linked chains of nodes
Objectives To create and work with linked chains of nodes To create a component of score storage and update software used in sporting software, or a computer game ScoreDemo class This will be the only class with a main method in it This is the class used for testing the list, interacting with the user, etc. 0 I repeat: ONLY ScoreDemo should contain a main method. The ScoreNode and ScoreList classes should be independent of any directly executable functionality. ScoreList will require an instance being made inside the demo class, and interactivity from the user, provided by that class. ScoreNode class ScoresList class Method Notes Scores List No-argument constructor. Sets the ScoreList's linked chain head node (front) to null ScoresList(ScoresList otherList) A copy constructor. This constructor will perform a deep copy on the otherList, making an exact copy of it. add(String name, int score) Add the name/score value to the linked chain in the correct order based on what is already in the chain (if anything). Remember, you must maintain the list in sorted order, descending. The file scores.txt will contain, on each line, the name of the player, followed by their high score, such as the following: Bob 150 Dan 220 Samantha 70 Ksenia 175 Nathan 15 The files are, in general, not going to be in a sorted order. The ScoresList class should, as you add the names and corresponding scores from file, keep them in descending (largest to smallest) order in the linked chain of nodes. Would you like to add another (1), remove (2), or quit the program (3)? 1 Write the name of the person you'd like to remove Samantha The new scores are: Dan 220 Ali 190 Ksenia 175 Bob 150 Nathan 15 Would you like to add another (1) or quit the program (2)? 3 Thanks for using the program! GoodbyeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started