Trusted by Students Everywhere
Why Choose Us?
0% AI Guarantee

Human-written only.

24/7 Support

Anytime, anywhere.

Plagiarism Free

100% Original.

Expert Tutors

Masters & PhDs.

100% Confidential

Your privacy matters.

On-Time Delivery

Never miss a deadline.

Create a class Employee that has a field for storing the complete name of the employee (first and last name), a field for storing the identification number of the employee (ID), and another field for storing his salary

Computer Science Apr 16, 2021

Create a class Employee that has a field for storing the complete name of the employee (first and last name), a field for storing the identification number of the employee (ID), and another field for storing his salary. Provide 1. a no-argument constructor for initializing the fields to default values. 2. a 3-argument constructor for initializing the fields to values sent from outside. Use strcpy function to copy one string into another. 3. a setter function (mutator) that sets the values of these fields by getting input from the user. 4. an accessor function to display the values of the fields. Derive three classes from this employee class: Manager, Scientist, and Laborer. Manager class has an additional data member of # of subordinates. Scientist class contains additional information about # of publications. Laborer class is just similar to the employee class. It has no additional capabilities. Derive a class foreman from the Laborer class that has an additional data member for storing the percentage of quotas met by a foreman. Provide appropriate no-argument and n-argument constructors for all the classes. Provide the overridden getter and setter functions here too to input and output all the fields. Determine whether public, private, or protected inheritance should be used.

Expert Solution

For detailed step-by-step solution, place custom order now.
Need this Answer?

This solution is not in the archive yet. Hire an expert to solve it for you.

Get a Quote
Secure Payment