Please Solve the Question in C++ as quickly as you can in 40 minutes. And do the same as asked in the question. Don't use extra things, please. Please do it correctly Dont waste my questions. Only Expert Answer the Question. . .  Write a class named Grade that has the following member variables and functions. Variables : protected: double score, char letter Functions: Required Constructors                     Getscore() // it will return score Getgrade() // it will assign the grades to letter variable and returns it. If score> 89 then A, > 79 then B, ..>69 then C, > 59 then D, else F. Derive a class named PassFail publically from class Grade that has the following member variables and functions. Variables: private: MinPassing Functions: Required constructors                     Getgrade() // it will return “P” if score >=MinPassing else return “F” Derive a class named FinalEExam publically from class PassFail that has the following member variables and functions. Variables : private :questions (total questions), missed(missed questions), points (points of each question) Functions: Required constructors CalculateScore() // it will calculate points of each question if total marks are 80. It will also calculate the final score and assign it to the score variable in Grade class. In a course, a teacher gives the following tests and assignments: • A lab activity that is observed by the teacher and assigned a numeric score. • A PassFail eexam that is also observed by the teacher and assigned a numeric score. The minimum passing score is 70. • A FinalEExam that has 50 questions. Write a class named CourseGrades . The class should have a member named grades that is an array of Grade pointers. The grades array should have 3 elements, one for each of the assignments previously described. The class should have the following member functions: setLab : This function should accept the address of a Grade object as its argument. This object should already hold the student’s score for the lab activity. Element 0 of the grades array should reference this object. setPassFail : This function should accept the address of a PassFail object as its argument. This object should already hold the student’s score for the PassFail eexam. Element 1 of the grades array should reference this object. setFinalEExam : This function should accept the address of a FinalEExam object as its argument. This object should already hold the student’s score for the Final exam. Element 2 of the grades array should reference this object. print : This function should display the numeric scores and grades for each element in the grades array. Make sure that for PassFail object, P or F is displayed and for FinalEExam object, grade (A – F) is displayed. Write a main function that will declare and initialize pointer objects of type Grade, PassFail and FinalEExam using constructor. Then declare object of coursegrades class and call the setLab, setPassFail setFinalEExam and print function. Note: Do not change the names of functions and variables. Otherwise, marks will be deducted. Do not define extra functions except for required constructors.

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

Please Solve the Question in C++ as quickly as you can in 40 minutes. And do the same as asked in the question. Don't use extra things, please.

Please do it correctly Dont waste my questions.

Only Expert Answer the Question. . . 

Write a class named Grade that has the following member variables and functions.

Variables : protected: double score, char letter

Functions: Required Constructors

                    Getscore() // it will return score

Getgrade() // it will assign the grades to letter variable and returns it. If score> 89 then A, > 79 then B, ..>69 then C, > 59 then D, else F.

Derive a class named PassFail publically from class Grade that has the following member variables and functions.

Variables: private: MinPassing

Functions: Required constructors

                    Getgrade() // it will return “P” if score >=MinPassing else return “F

Derive a class named FinalEExam publically from class PassFail that has the following member variables and functions.

Variables : private :questions (total questions), missed(missed questions), points (points of each question)

Functions: Required constructors

CalculateScore() // it will calculate points of each question if total marks are 80. It will also calculate the final score and assign it to the score variable in Grade class.

In a course, a teacher gives the following tests and assignments:

• A lab activity that is observed by the teacher and assigned a numeric score.

• A PassFail eexam that is also observed by the teacher and assigned a numeric score. The minimum passing score is 70.

• A FinalEExam that has 50 questions.

Write a class named CourseGrades . The class should have a member named grades that is an array of Grade pointers. The grades array should have 3 elements, one for each of the assignments previously described.

The class should have the following member functions:

setLab : This function should accept the address of a Grade object as its argument. This object should already hold the student’s score for the lab activity. Element 0 of the grades array should reference this object.

setPassFail : This function should accept the address of a PassFail object as its argument. This object should already hold the student’s score for the PassFail eexam. Element 1 of the grades array should reference this object.

setFinalEExam : This function should accept the address of a FinalEExam object as its argument. This object should already hold the student’s score for the Final exam. Element 2 of the grades array should reference this object.

print : This function should display the numeric scores and grades for each element in the grades array. Make sure that for PassFail object, P or F is displayed and for FinalEExam object, grade (A – F) is displayed.

Write a main function that will declare and initialize pointer objects of type Grade, PassFail and FinalEExam using constructor. Then declare object of coursegrades class and call the setLab, setPassFail setFinalEExam and print function.

Note: Do not change the names of functions and variables. Otherwise, marks will be deducted. Do not define extra functions except for required constructors.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Reference Types in Function
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