Question: Write a program in C++ that does the following: 1. Declares a whole number type constant value space called MAX_STUDENTS and Stores the value of
Write a program in C++ that does the following:
1. Declares a whole number type constant value space called MAX_STUDENTS and Stores the value of 3
2. Declares a whole number type constant value space called MAX_TESTSCORES and Stores the value of 5
3. Declares an array that can store MAX_STUDENTS number of names as string values
4. Declares a 2-Dimensional array that can Store for each of the MAX_STUDENTS number of students, MAX_TESTSCORES number of test scores as numeric values
5. Declares decimal type arrays for storing total, and average test score values, each can store MAX_STUDENTS number of values
6. Declares a string type array that can store MAX_STUDENTS number of
7. Using a nested for repetition structure
a) with the outer for that runs MAX_STUDENTS number of times,
b) prompt the user to input a persons name by using the prompt Enter a students name: on the screen, for example: Enter a students name: after user entered the input, for example, John: Enter a students name: John
c) Reads the users inputted name from the keyboard and Stores it at the right location in the array created for user inputted names
d) With an inner for structure that runs MAX_TESTSCORES number of times,
e) prompts the user to input that persons test score by student name and test score number, using the prompt Enter
f) Reads the users inputted value from the keyboard and Stores it at the right location in the array created for user inputted test scores
g) Adds the test score stored to the total array at the right location
h) After the inner for structure (still inside of the inner for structure)
i) Calculates the average and stores it at the right place in the average array
j) Calculates the letter grade for the average score calculated using a selection structure, and stores it at the right location in the letter grade array
k) Ends the outer for structure
8. Display the Column header for the output of the student's records, for example, it should display: student name score #1 score #2 score #3 score #4 score #5 total average grade
9.) Using another nested for repetition structure
a) with the outer for that runs MAX_STUDENTS number of times,
b) Retrieves the students name from the names array and displays it with proper formatting space,
c) With an inner structure that runs MAX_TESTSCORES number of times,
d) Retrieves the student test score from the test scores array and displays the test scores, with proper formatting spaces
e) After coming out of the inner for repetition structure (while still inside of the outer for structure)
f) Retrieves the student test score total, average, and letter grade from the total, average and letter grade arrays and displays them, with proper formatting spaces
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
