Question: Cumulative Grade Point Average Purpose: This lab will help to broaden your understand on C++ inheritance, encapsulation and data hiding. You will gain more experience
Cumulative Grade Point Average Purpose: This lab will help to broaden your understand on C++ inheritance, encapsulation and data hiding. You will gain more experience defining classes, parent/base/super classes, and derived classes (subclasses) from an existing class or classes. You will experience data and functions reusability and extensibility of class inheritance. Furthermore, after this lab exercise, you should be able to work with any type of class inheritance. Tasks: This lab must be completed and submitted on or before the due date Sunday 11:59pm. Submission link is provided on Blackboard. Lab Homework - Write the program to calculate the current semester GPA and cumulative GPA for a senior student using the given data for the student in the classes below. Display from main() your results in the format below: Student Id Name Program Previous Cumulative Points Previous Total Credits Passed Semester Total Points Semester Total Credits Semester GPA Cumulative GPA Rubric: Your program must show the hybrid inheritance relationship among the classes (Base and Derived) as shown in the figure below. Feel free to use any naming conventions for declaring your classes (A, B, C and D). X
C++ CODE
You can directly initialize the data members in the classes (A, B, and C) with the information given. However, class D data must be computed. (Hint: Only a class object (class D) is required for this problem). Class A - Access specifier must be set Private for data members: {Student Id, Current Cumulative GPA, Total Course Credits Passed} = {101, 3.75, 110} Class B - Inheritance relationship of class B with class A is Protected: Access specifier must be set Protected for data members: {Course, Student Id, Academic Year, Semester, Course Credit, Course Final Grade} = {{CS401, 101, 2020, 1, 3, 4.0}, {EE347, 101, 2020, 1, 4, 3.0}, {EE352, 101, 2020, 1, 3, 4.0}, {CS499, 101, 2020, 1, 4, 4.0}, {EE469, 101, 2020, 1, 3, 4.0}, {CS470, 101, 2020, 1, 3, 3.0}} Class C - Access specifier must be set Public for data members: {Student Id, Student Name, Program} = {101, David Britain, Computer Science} Class D - Inheritance relationship of class D with class B and class C is Public: Access specifier must be set Public for data members: {Total Semester Point, Total Semester Course Credits, Semester GPA, New Cumulative GPA}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
