Part 1: Consider a text file named scores.txt that contains player scores for a game. A possible sample is shown here wh
Posted: Thu Jul 14, 2022 2:17 pm
Part 1: Consider a text file named scores.txt thatcontains player scores for a game. A possible sample is shown herewhere Ronaldo’s best score is 10400, Didier’s best score is 9800,etc.
Write a function named getHighScore that takes astring reference parameter and an integer reference parameter. Thefunction should scan through the file and set the referenceparameters to the name of the player with the highest score and thecorresponding score.
****This is the original problem, I completed this partof the code. Very similar to this one: I need second part. c++ only . Thankyou. **********
https://www.answers.com/homework-help/que ... 6a2512157c
Part 2: Given the scores.txt file described inProgramming Project 4.16, write two additional functions. The firstfunction should be named getPlayerScore and take a stringparameter as input that is a player’s name, and it should returnthe player’s high score stored in the file. If the player’s name isnot in the file, then the function should return 0. The secondfunction should output whether a player’s high score is aboveaverage, exactly equal to the average, or below aver- age, wherethe average is computed from all of the scores in the file. Youshould design the function appropriately (i.e., determine thefunction name, parameters, and return values).
Write a function named getHighScore that takes astring reference parameter and an integer reference parameter. Thefunction should scan through the file and set the referenceparameters to the name of the player with the highest score and thecorresponding score.
****This is the original problem, I completed this partof the code. Very similar to this one: I need second part. c++ only . Thankyou. **********
https://www.answers.com/homework-help/que ... 6a2512157c
Part 2: Given the scores.txt file described inProgramming Project 4.16, write two additional functions. The firstfunction should be named getPlayerScore and take a stringparameter as input that is a player’s name, and it should returnthe player’s high score stored in the file. If the player’s name isnot in the file, then the function should return 0. The secondfunction should output whether a player’s high score is aboveaverage, exactly equal to the average, or below aver- age, wherethe average is computed from all of the scores in the file. Youshould design the function appropriately (i.e., determine thefunction name, parameters, and return values).