Write a class that keeps track of the top five high scores that could be used fo
ID: 3531619 • Letter: W
Question
Write a class that keeps track of the top five high scores that could be used for a video game. Internally, the class should store the top score in a data structure of your choice (the most straightforwar way is to use arrays). Each entry consists of a name and a score. The data stored in memory should be synchronized with a text file for persistent storage. For example, here are the contents of a sample file where Ronaldo has the highest score and Pele has the third highest score: Ronaldo 10400 Didier 9800 Pele 9750 Kaka 8400 Cristiano 8000 The constructor should test if the file exists. If it does not exist, then the file should be created with blank names for each of the players and a score of 0. If the file does exist, then the data from the file should be read into the class
Explanation / Answer
class( student[i]; marks[j] )
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.