Essay Help Services

Create Data Attributes to Common People

Home Recent Questions Create Data Attributes to Common People

A student is a person, and so is an employee. Create the data attributes common to all persons (name, social security number, age, gender, address, and telephone number) and appropriate member function definitions. A student has a GPA, major, and year of graduation. An employee has a department, job title, and year of hire. In addition, there are hourly employees (hourly rate, hours worked, and union dues) and salaried employees (annual salary). Define a class hierarchy and write an application that you can use to first store the data for a group of people then display that information in a meaningful way. You must be able to add and remove persons from the group, and persons may be from any of the various classificatoins of persons. You should be able to find persons by name, etc.

You MUST use an STL container (list would be a good choice) to store your people.

You need to create at least 5 classes -- Person, Student, Employee, Hourly Employee, and Salaried Employee. Your Employee class must contain this public member:

virtual double get Annual  Wages() = 0; // a pure virtual function.

Both HourlyEmployee and Salaried Employee MUST implement this function... This is very useful as the compuations for the annual wages for a hourly and a salaried employee are different though in themselves not very complicated, and through C++ inheritence we're letting the language do a lot of the work for us :)

Use a separate class to store your set of persons. Have your application program call methods of this container class to perform the application functionality.

Use multiple-inheritence to create the Student Employee class (you may assume that all student Employees are HourlyEmployees). Extend your application so that this class of person may be stored in the group.

Similar Posts

Order Now

Latest Reviews


Payments And Security