Question
Quiz Statistics For this assignment, you will write a c++ program and flowchart that requests the quiz scores for 7 students by name. The program
Quiz Statistics For this assignment, you will write a c++ program and flowchart that requests the quiz scores for 7 students by name. The program computes the average score and determines the student with the highest score. The students in this class are Henry, Edward, Jane, Mary, Elizabeth, James, and Charles. Your program must use this main procedure which calls the four procedures you are to implement. setStudentNames takes an out parameter, studentNames, which is an array of integers. It sets each array element to a name according to the list above. inputScores takes an in parameter, studentNames and an out parameter, scores. which is an array of 7 doubles. It asks for the score for each student by name and fills the scores array. This procedure must use a loop. getAverage takes scores as an in parameter and returns the average in an out parameter. It must use a loop to compute the sum of the scores. getHighIndex also takes scores as an in parameter and returns the index (1-7) of the student with the highest score. This procedure will require an if statement inside a loop. Hints 1. This program requires the use of parallel arrays as described in chapter 7. 2. Lessons #7 and #8 have examples of inputting values into an array and looping through those values. You will perform similar actions for this assignment.
3. If two students are tied for the highest score, your program only needs to display one of them. 4. The debug_lab C++ program in lesson 7 includes a function which returns the index of the highest sales. The getHighIndex procedure is similar. Sample Output (input in BOLD) Please enter the score for Henry 73 Please enter the score for Edward 81 Please enter the score for Jane 68 Please enter the score for Mary 95 Please enter the score for Elizabeth 77 Please enter the score for James 46 Please enter the score for Charles 83 The average score is 74.7143 The high score was Mary with a 95 Extra Credit (10 Points) For extra credit, modify your program so that it also displays the name and score for the student with the second highest score. The average score is 74.7143 The high score was Mary with a 95 The next highest score was Charles with a 83
Step 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