Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4 FUNCTIONS BEGIN HERE AND THIS IS WHERE I NEED HELP this is what the output should look like so the code for the most

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

4 FUNCTIONS BEGIN HERE AND THIS IS WHERE I NEED HELP

image text in transcribed

image text in transcribed

this is what the output should look like

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

so the code for the most part is complete and will run BUT I NEED HELP WITH THE 4 FUNCTIONS AT THE BOTTOM i'm not sure what to enter to get them to return the correct answers as per the output it may be easy for you all who work on it but it's pretty hard for me i'm learning still please help

string studentName[NUM_STUDENTS]; Holds the name of each student int studentID[NUM_STUDENTS]; Holds the ID for each student int age[NUM_STUDENTS]; Holds the ae of each student \begin{tabular}{|l|l|l|l|l|l|llll|} \hline[0] & \multicolumn{1}{c}{[1]} & {[2]} & {[3]} & {[4]} & {[5]} & {[7]} \\ \hline 25 & 19 & 35 & 55 & 22 & 21 & 20 & 18 \\ \hline \end{tabular} int studentGrade[NUM_STUDENTS] [NUM_GRADES] ; Holds the grade for each exam for each student. Each row corresponds to a student and each column corresponds to an exam grade. string information[NUM_INFO] = f "Transfer Student", "On Scholarship", "At-Risk", "Campus Housing", "Athlete" \}; Holds the information associated with each column in the two-dimensional array stulnfo bool stuinfo[NUM_STUDENTS][NUM_INFO]; Holds the information for each student. Each row corresponds to a student and each column corresponds to specific information about the student. Each column is parallel to an element in the above information array. The number 1 means the information is true. You have been assigned the task of writing the functions that return the data included in the reports: - double computeAverage (int grade[] [NUM_GRADES], int student, int numGrades) The purpose of function computeAverage () is to compute an average for any given student. computeAverage () accepts as arguments the two-dimensional array of grades, the index of the student of which an average should be calculated for, and the number of grades. The function should use a loop to traverse through the grade array at the specified row (determined by the student parameter). At each iteration of the loop, the grade should be added to an accumulator. When the loop terminates, the average grade can be computed. The function should return the average grade for the specified student. - int highestScoreOnExam (int grade [] [NUM_GRADES], int examIndex, int numStudents) The purpose of function highestscoreonExam() is to find the highest exam score for the specified exam. highestscoreonExam () accepts as arguments the the two-dimensional array of grades, the index of an exam, and the number of students. The function should use a loop to traverse through the grade array and find the highest grade recorded for the specified exam. The function should return the highest grade on the specified exam. - int indexOfHighest (int grade[] [NUM_GRADES], int examIndex, int numStudents) The purpose of function indexofinighest ( ) is to find the highest score on a specified exam and return the index of the highest score (this is the row index). indexofighest () accepts as arguments the the two-dimensional array of grades, the index of an exam, and the number of students. The function should use a loop to traverse through the grade array and find the highest grade recorded for the specified exam and save the index of that exam. The function should return the index of the highest grade on the specified exam.. - double percentInAgeRangeWithSpec (int age [], bool info[] [NUM_INFO], int numStudents, int lower, int upper, int infoIndex) The purpose of function percent InAgeRangewithspec () is to compute the percentage of students that qualify for a specified information property that are in a given age range. percent InAgeRangewithspec () accepts as arguments the the age array, the two-dimensional array of student info, the number of students, the lower and upper age ranges, and an index into the information array (used to specify the information being searched for). The function should use a loop to traverse through the age array and determine if the age falls inclusively between the lower and upper parameter values. If so, a counter keeping track of the total number that fall in the range should be incremented. Next, the info array should be checked for a 1 at the specified infolndex. If a 1 is found, a counter keeping track of the specified info should be incremented. The function should return the percentage in decimal format of the number of students who fall into the specified category in the given age range. You should NOT modify the main method in any way. All output has been included in the main method. The above functions have been called from main0. You should accomplish all tasks in the the body of the functions. The function prototypes and function headers have been included for you. The program in the template window compiles because dummy return statements were included in the functions. Before making any modifications, run the program in Develop mode so that you can see the output before you add your own code in the body of the functions. Be sure to follow recommended programming convention: make good use of whitespace, document your code, and use self-documenting variable names. When the input is as shown in Figure 1, your program should produce the output as shown in Figure 2. Figure 1: (sample input) Figure 2: (sample output) 1. Compare output ( 2 points) When innut is Standard output exactly matches Highest Exam Score Person Who Scored Highest

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions