Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NOTE: WRITE PROGRAM IN C++ Q. No. 02: Create a class Student that contains information about a student's name, semester, roll no, and date of

image text in transcribed NOTE: WRITE PROGRAM IN C++

Q. No. 02: Create a class Student that contains information about a student's name, semester, roll no, and date of admission. To store the date of admission, create a date class that you have already developed. Determine whether you should use inheritance or composition. a) A no-argument constructor for initializing the values of data members to some defaults. b) A 4-argument constructor to initialize the data members sent from the calling function at the time of creation of an object(date should be sent from outside in the form of a date object) c) An input function for setting the status of a student. d) A display function to display all the attributes of a student .Derive a class Undergraduate from Student class that contains some additional information. This information is about the semester gpa of a student and the credit points earned per semester. To store this data, provide a 2D array (2x8 array since at maximum there are 8 semesters for an undergraduate program). One dimension of the array should hold information about the SGPA of each semester so far and the other dimension should hold the corresponding credit points earned in that semester a) Create a no-argument and a 5-argument constructor for data member initialization. b) Provide overridden input functions for setting the data members. c) Provide another function to calculate the CGPA of student on the basis of the information provided by the 2D array. Derive a class Graduate from Student class that also has the same additional information as the Undergraduate class but in this case, the array is 2x4 since at maximum there are four semesters in a Graduate program. There are two additional data members: one to store the title of the last degree held and another to store the area of specialization in graduate program. Provide appropriate constructors and overridden member functions

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions