Question: Must be written in C++ language In this part, you will design aggregate classes to record personal and academic information about instructors at a university.
Must be written in C++ language
In this part, you will design aggregate classes to record personal and academic information about instructors at a university.
The classes are: Instructor, and Course (from Program 1). All class attributes must be private and accessed through public member functions.
1. You need to write appropriate constructor (default and overloaded), accessor (print and get if necessary) and mutator (set) functions for each class. The attributes of each class are summarized below:
Instructor class contains personal and academic information. You may assume every instructor teaches 3 courses. Instructor class has the following private attributes:
string firstName
string lastName
char gender (M for Male and F for Female)
long empoyeeID
string officeNum
Course courses[3]
Course class contains individual course information and has the following private attributes:
long courseNumber
string courseName
int numberOfCredits
2. After you design your classes, write a main program that instantiates 2 instructor objects and displays their information:
- For the first object:
1. use the overloaded constructor to create an instructor object and initialize its attributes to the following:
Mayssaa Najjar F 2390876 ACD324 21540 CS211 3 21541 CS211 1 21345 CS331 3
2. Then call the print function to display the instructor objects data. -
For the second object,
1. use the default constructor to create an instructor object
2. call the print function to display the instructors data
3. call the instructor set function to change the objects attributes to the following:
Michelle James F 2390878 SBSB3024 24540 CS111 3 24541 CS111 1 22275 CS351
3
4. call the instructor print function to display the new objects data.
Please shows comments and results.
Note: You will have a total of two .h files (Course.h and Instructor.h) and three .cpp files (Course.cpp, Instructor.cpp, and main.cpp).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
