Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Project 07 - Test Scores Input Data For each student, the following data will be input: . student name (your program should handle names of
Project 07 - Test Scores Input Data For each student, the following data will be input: . student name (your program should handle names of up to 30 characters - may contain spaces) test 1 (an integer value) test 2 (an integer value) test 3 (an integer value) Use a struct to hold the name and score for each student, which will be a struct. The name should be stored in a C++ string object. Validation Tests are graded on a 100-point scale with a 10-point bonus question. So a valid test score should be 0 through 110. Processing Your program should work for any number of students. When the program starts, it should ask the user for the number of students to be processed. Then it should dynamically allocate an array of that size (array of student/score structures) using the new operator. The program should then: . Call a function to input the student name/score pairs and store them in the array. Input validation: the score must be between 0 and 110, inclusive. Call a function to sort the array on the score member in ascending (increasing) order. Call a value-returning function that calculates the average of the scores. Call a function that displays a neat table of student name/score pairs in sorted order. Include appropriate column heading for your table. Following the table, display the average score with appropriate label. Note: you must declare the array parameter using pointer notation instead of array notation, and inside the function you must use pointer notation instead of array notation to access the array elements. If you do not understand this requirement, email me. The score is the average of the 3 test scores Requirements/Hints: 1. Global variables are variables that are declared outside any function. Do not use global variables in your programs. Declare all your variables inside functions 2. Use the C++ string class to hold the student name. 3. Use a struct to store student name/score pairs. 4. Use a dynamically-allocated array of struct to store the information for a class. 5. You must declare the array parameter using pointer notation instead of array notation, and inside the function you must use pointer notation instead of array notation to access the array elements.SAMPLE RUN (User entry is in BOLD) AllyBaba Cooking Class How many students: 3 Student #1 Enter the name Jim Smith Enter grade for test 1: 75 Enter grade for test 2: 79 Enter grade for test 3: 77 Student #2 Enter the name Victor Montero Enter grade for test 1: 81 Enter grade for test 2: 90 Enter grade for test 3: 89 Student #3 Enter the name Christa Kim Enter grade for test 1: 88 Enter grade for test 2: 80 Enter grade for test 3: 92 Semester Summary: AllyBaba Cooking Class Name Scores Letter Grade Jim Smith 75, 77, 79 C Victor Montero 81, 89, 90 B Christa Kim 88, 92, 80 B Number of stidents: X Class Average XXXX Number of A's: Number of B's: Number of C's: DO- NO Number of D's: Number of F's: End of Project 7
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