Student quizzes and grade application Write a C++ class called Student that should contain the following: A data member name. A data member idNumber Three data members quiz1, quiz2, quiz3. A...


Student quizzes and grade application


Write a C++ class calledStudent that should contain the following:



  • A data member name.

  • A data member idNumber

  • Three data members quiz1, quiz2, quiz3.

  • A constructor that initializes each of the data members.

  • A get member function for each of the data member.

  • Three set member functions, one for each of setQuiz1, setQuiz2 and setQuiz3

  • A member function average to return the average of the three quizzes.

  • A member function printDetails to print the details of a student object in the following format:

    • Student Name: ??????????

    • Student ID: ???????????

    • Quiz Grades: ??????? ????????? ????????




Also write a driver programStudentDriver.cpp that does the following:



  • Creates an object of type Student, supplying values for name, ID number and three quizzes in a constructor call.

  • Calls the printDetails member function to print the details of the student

  • Calls the average member function to get the average and print it.

  • Prompts the user if any change of grades is wanted

  • Asks the user of which quiz grade to change

    • Prompts for and reads the new grade for the quiz

    • Then updates the quiz’s grade with the newly entered grade

    • Prints the details and the average again to show that the change is reflected in the student’s record



  • Requests if any more change is need to be made to any of the quizzes.

  • Repeat the process of prompting the user for changes until the user selects N


Below, you find a sample run of the program. Pay attention to the format of the output and what gets printed. Also note that the input of of the program is indicated by text that is enclosed by two stars on both sides (you do not need to write code that prints out the input). You should mimic the output.


Example Output:


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Student Name: Sample Name


Student ID: 970875


Quiz Grades: 85 100 95


The student's quiz average is: 93.33 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Do you want to change any of the quizzes' grades ( Y or N) : **Y**


Which quiz do you want to change ( 1 or 2 or 3 ): **1**


Enter the grade for quiz 1: **1** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Student Name: Sample Name


Student ID: 970875


Quiz Grades: 1 100 95


The student's quiz average is: 65.33 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Do you want to change any of the quizzes' grades ( Y or N) : **Y**


Which quiz do you want to change ( 1 or 2 or 3 ): **2**


Enter the grade for quiz 2: **0** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Student Name: Sample Name


Student ID: 970875


Quiz Grades: 1 0 95


The student's quiz average is: 32 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Do you want to change any of the quizzes' grades ( Y or N) :**N**

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here