Question
* NO HAND WRITING PLEASE * * in C++ please * Inheritance In this laboratory, we are going to build a base class and a
* NO HAND WRITING PLEASE *
* in C++ please *
Inheritance
In this laboratory, we are going to build a base class and a collection of derived classes.
1- Write the code to implement the class Person. A person has a name, address,telephone number and and E-Mail address. Be sure to include accessor functions to return each of these values.
2- Create a derived class Student which has a class status (freshman, sophomore, junior, or senior).
3- Create a derived class Employee which has the attributes office, salary, and date hired.
4- Now define a class Faculty which is derived from Employee. The attributes for the Faculty class are rank (professor, associate, assistant, lecturer) and status (tenured, tenure-track, visiting, non-tenure-track).
5- Define a class Staff derived from Employee. Staff has a single attribute indicating the position (job title).
6- Write a test main program that creates a Person, Student, Employee, Faculty, and Staff object. Use accessor functions on each object to show they are working.
Inheritance In this laboratory, we are going to build a base class and a collection of derived classes. 1. Write the code to implement the class Person. A person has a name, address telephone number and and E-Mail address. Be sure to include accessor functions to return each of these values 2. Create a derived class Student which has a class status (freshman, sophomore, junior, or senion) 3. Create a derived class Employee which has the attributes office, salary, and date hired. 4. Now define a class Faculty which is derived from Employee. The attributes for the Faculty class are rank (professor, associate, assistant, lecturer) and status (tenured, tenure-track, visiting, non-tenure-track) 5. Define a class Staff derived from Employee. Staff has a single attribute indicating the position (job title) 6. Write a test main program that creates a Person, Student, Employce, Faculty, and Staff object. Use accessor functions on each object to show they are working
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started