C++
Write a program to calculate a bowling league's average bowling scores. You will need to read the input data from the file"BowlingScore.txt"
- ou must use three arrays:
- a one-dimensional array to store the bowler's names.
- a (parallel) two-dimensional array to store the bowling scores.
- a one-dimensional array to store the bowler's average score.
- Your program must contain at least the following functions:
- a function called GetBowlingData to read and store data into two arrays. The function should take as input parameters the file name and both empty arrays, which it should fill from the file "BowlingScore.txt"
- return a status of either success or failure (i.e true or false).
- a function called GetAverageScore that is used to calculate the average bowling score. The function should take as input the populated arrays and return the average score of each bowler in a separate array.
- a function called PrettyPrintResults to output the results, i.e. bowler name, scores and average.
- Don't use Vectors or any other newfangled container, use only old school C arrays like in the book.
- Use repetition structures (loops) in your functions to perform calculations and printing. Remember "dimensions = loops". So a 2 dimensional array will require 2 loops to completely iterate over all of the elements in the array.
- And as always, don't use magic numbers. Instead use global constants at the top of the program under the includes.
5 years ago 10
Answer(0)
other Questions(10)
- Answer two questions in part I, OR the one question in part II. Part I answers should be btw 750-1,250 words; part II answers btw 1,250 and 2,000 words.
- phed 3
- FIN 571 Week 6 - Individual Assignment - Managing Growth Simulation
- HIS 105
- Write a memo that would be distributed to employees. Be sure to address the issues associated with these behaviors and...
- China
- ART 101 Week 4 CheckPoint Design Movements Appendix C
- illegal or unethical
- 100 A Discussion Question: Transference and Countertransference
- Linear algebra, matlab knowledge required, handshake required