Question: Define a base class SJSUMember that has name ( type string ) , and TowerID ( type int ) . Then create a derived class

Define a base class SJSUMember that has name (type string), and TowerID (type int). Then create a derived class SJSUStudent, which has additional properties: year of graduation (type int), courses taken (type string pointer), and number of courses taken (type int). Since the courses taken can grow, we need to use a string pointer to a dynamic array of strings and each course is recorded in a string object in the following format: CMPE-50,CMPE-30,CS-46, and so on. Since the courses taken are a partially filled array, you need a variable to keep track of number of courses in the array. You also need to define and implement the following member functions of SJSUMember:
Default constructor and copy constructor
Virtual destructor
Overloaded assignment operator=
Virtual function print() to print the name, TowerID
You need to define and implement the following member functions of SJSUStudent:
Default constructor and copy constructor
Virtual destructor
Overloaded assignment operator=
Virtual function print() to print all member variables, such as name, TowerID, year of graduation and courses taken.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!