Do it in C++ (The Person, Student, Employee, Faculty, and Staff classes) Design a class named Person and its two derived classes named Student and Employee. Make Faculty and Staff derived classes of Employee. A person has a name, address, phone number, and e-mail address. A student has a class status (freshman, sophomore, junior, or senior). An employee has an office, salary, and date-hired. Define a class named MyDate that contains the field year, month, and day. A faculty member has office hours and a rank. A staff member has a title. Define a constant virtual toString function in the Person class and override it in each class to display the class name and the person’s name. Draw the UML diagram for the classes. Implement the classes. Write a test program that creates a Person, Student, Employee, Faculty, and Staff, and invokes their toString() functions.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter12: Adding Functionality To Your Classes
Section12.2: Providing Class Conversion Capabilities
Problem 6E
icon
Related questions
Question

Do it in C++

(The Person, Student, Employee, Faculty, and Staff classes) Design a class
named Person and its two derived classes named Student and Employee. Make
Faculty and Staff derived classes of Employee. A person has a name, address,
phone number, and e-mail address. A student has a class status (freshman,
sophomore, junior, or senior). An employee has an office, salary, and date-hired.
Define a class named MyDate that contains the field year, month, and day. A
faculty member has office hours and a rank. A staff member has a title. Define a
constant virtual toString function in the Person class and override it in each class
to display the class name and the person’s name.
Draw the UML diagram for the classes. Implement the classes. Write a test program
that creates a Person, Student, Employee, Faculty, and Staff, and invokes their
toString() functions.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr