Write a program that uses the class salariedemployeenbsp


Write a program that uses the class SalariedEmployee.  Your program is to define a derived class called Administrator, which is to be derived from SalariedEmployee.  You are to supply the following data and function members in the Administrator class:

  • A member variable of type string that contains the administrator's title (e.g., Director, Vice President)
  • A member variable of type string that contains the company area of responsibility (e.g., Production, Accounting)
  • A member variable of type string that contains the name of this administrator's immediate supervisor
  • A protected member variable of type double that holds the administrator's annual salary (if the salary is for an administrator, the salary is kept in this variable, not the salary variable in the SalariedEmployee class)
  • A member function that returns each of the variables above
  • A member function which sets each of the variables above
  • A member function called print, which outputs the object's data to the screen

The SalariedEmployee class is to contain the following:

  • Member variables containing the following data: name, ssn, netPay, wageRate, hours, department (the variables wageRate and hours are to be set to private)
  • A member function that returns each of the variables above
  • A member function which sets each of the variables above

Write a program which instantiates employees and administrators (at least 5 employees and 2 administrators).  Write a user interface with a menu to make it easy for the user to enter data into the objects.  Then, once the data is entered, give the user options to change any data for an employee or administrator; and to print an employee's check with the information that was input (name, ssn, netPay, hours, wageRate, hours worked), along with the current date.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a program that uses the class salariedemployeenbsp
Reference No:- TGS01644223

Now Priced at $30 (50% Discount)

Recommended (91%)

Rated (4.3/5)