*******ALREADY HAVE PART 1 NEED PART 2. C++ ONLY******* Part 1. Consider a text file named scores.txt that contains play

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

*******ALREADY HAVE PART 1 NEED PART 2. C++ ONLY******* Part 1. Consider a text file named scores.txt that contains play

Post by answerhappygod »

*******ALREADY HAVE PART 1 NEED PART 2. C++ ONLY*******
Part 1. Consider a text file named scores.txt that containsplayer scores for a game. A possible sample is shown herewhere Ronaldo’s best score is 10400, Didier’s best score is 9800,etc.
Ronaldo10400Didier9800Pele12300Kaka8400Cristiano8000
Write a function named getHighScore that takes a string referenceparameter and an integer reference parameter. The functionshould scan through the file and set the reference parametersto the name of the player with the highest score andthe corresponding score.
ALREADY HAVE PART 1 CODE. SIMILAR TO:
https://www.answers.com/homework-help/que ... 6a2512157c
NEED PART 2:
Given the scores.txt file described in Programming Project 4.16,write two additional functions. The first function should benamed getPlayerScore and take a string parameter as input thatis a player’s name, and it should return theplayer’s high score stored in the file. If the player’s name is notin 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 average, where theaverage is computed from all of the scores in the file. Youshould design the function appropriately (i.e., determinethe function name, parameters, and return values).
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply