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 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 program StudentDriver.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**

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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 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 program StudentDriver.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**

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education