Construct a class definition to represent an employee of a company. Each employee is defined by...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Construct a class definition to represent an employee of a company. Each employee is defined by an integer ID number, a double-precision pay rate, and the maximum number of hours the employee should work each week. The class should provide these functions: a default and parameterized constructors to set data for a new employee, a faction to set the data for a new employee, a function to get the data for a new employee, a function to display existing data for a new employee, and a function to compare two employees' data. Protect functions and objects as needed. Include the class definition in a working C++ program and create 3 objects; construct the first object by calling the default constructor and the second object by calling the constructor with parameters; ask the user to enter data for the third object; display the data of each employee and compare the data of the second and third employee. Please enter an id number for employee 3: 23456 Please enter the max hours for employee 3: 45 Please enter the pay rate for employee 3: 15 Data for employee 1: The ID number is: 0 The maximum hours worked is: 0 The pay rate is: 0 Data for employee 2: The ID number is: 23456 The maximum hours worked is: 36 The pay rate is: 10.25 employee 3 id = 23456 employee 3 pay = 15 employee 3 hrs = 45 employee 1 and employee 2 are not the same Construct a class definition to represent an employee of a company. Each employee is defined by an integer ID number, a double-precision pay rate, and the maximum number of hours the employee should work each week. The class should provide these functions: a default and parameterized constructors to set data for a new employee, a faction to set the data for a new employee, a function to get the data for a new employee, a function to display existing data for a new employee, and a function to compare two employees' data. Protect functions and objects as needed. Include the class definition in a working C++ program and create 3 objects; construct the first object by calling the default constructor and the second object by calling the constructor with parameters; ask the user to enter data for the third object; display the data of each employee and compare the data of the second and third employee. Please enter an id number for employee 3: 23456 Please enter the max hours for employee 3: 45 Please enter the pay rate for employee 3: 15 Data for employee 1: The ID number is: 0 The maximum hours worked is: 0 The pay rate is: 0 Data for employee 2: The ID number is: 23456 The maximum hours worked is: 36 The pay rate is: 10.25 employee 3 id = 23456 employee 3 pay = 15 employee 3 hrs = 45 employee 1 and employee 2 are not the same
Expert Answer:
Answer rating: 100% (QA)
include using namespace std class Employee private int ID double payrate ... View the full answer
Related Book For
Quantitative Methods for Business
ISBN: 978-0324651751
11th Edition
Authors: David Anderson, Dennis Sweeney, Thomas Williams, Jeffrey cam
Posted Date:
Students also viewed these programming questions
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Mike has the following monthly information: Salary $4,000 Rent 1,800 700 Car payment Investment Income 200 Meals 900 Groceries 700 Student Loan Payment 400 Other Expenses 600 1. What is Mike's...
-
XYZ Timber Company has been logging forests in the Pacific Northwest for decades. It has done moderately well in replanting areas it has logged, but it has also been logging in areas where some trees...
-
The per-store daily customer count (i.e., the mean number of customers in a store in one day) for a nationwide convenience store chain that operates nearly 10,000 stores has been steady, at 900, for...
-
For the following products and countries, identify the type of warehouse that should be used as well as the method of transportation that should deliver the product to end users. Using the Internet,...
-
At April 30, partners capital balances in PDL Company are: G. Donley $52,000, C. Lamar $48,000 and J. Pinkston $18,000. The income sharing ratios are 5:4:1, respectively. On May 1, the PDLT Company...
-
Direct Labor Budgeted $14,200, Actual $14,200, Indirect Labor Budgeted 5,800, Actual 5,400, Utilities Budgeted 1,900, Actual 2,200, Rent Budgeted 3500, Actual 3500, Marketing Budgeted 150, Actual...
-
Draw the Diels-Alder product (a) maleic anhydride heat (b) maleic anhydride heat H,C. CH3 (c) maleic anhydride 250 C
-
If the real rate of interest is 1.75% and if the expected inflation rate is 8.65%, what is the present value of $50,000 to be received exactly 8 years from today? 2. You expect to deposit the...
-
What is the value today of a money machine that will pay $1,340.00 every six months for 16.00 years? Assume the first payment is made 1.00 years from today and the interest rate is 14.00%. What is...
-
A topic that has a local focus, such as a change that needs to happen in your community. Please include three things: what the need for change is, what your planned solution is, and who the audience...
-
Derek will deposit $849.00 per year for 12.00 years into an account that earns 8.00%. The first deposit is made today. How much will be in the account 12.0 years from today? Note that he makes 12.0...
-
There is a need for a parking lot within a given town. A land in a suitable location is available for purchase that they could pave to provide some additional parking. Based on a survey of local...
-
The following refer to a primal-dual (min-max) pair P and D of linear programming problems in canonical form. Provide a brief explanation with your answers. a. If a basic solution to the primal is...
-
What mass of H2 will be produced when 122 g of Zn are reacted? Zn(s) + 2HCl(aq) ( ZnCl2(aq) + H2(g)
-
The ONeill Shoe Manufacturing Company will produce a special-style shoe if the order size is large enough to provide a reasonable profit. For each special-style order, the company incurs a fixed cost...
-
Electric power consumption is measured in kilowatt-hours (kWh). The local utility company has an interrupt program, whereby commercial customers who participate receive favorable rates but must agree...
-
A quality control specialist has sampled 25 widgets from the production line. A widget can have minor or major defects. Of the 25 sampled widgets, 4 have minor defects and 2 have major defects. What...
-
The SDLC is just one model for systems development. Find at least one more and describe the differences.
-
Draw DFDs for each of these scenarios: (a) A customer goes into a bookshop and asks for this book. The member of staff looks for the book in the online stock catalogue and reports that the book is...
-
Draw an entity model to model this university scenario: A university department employs lecturers and clerical staff. It offers a three-year degree. A student has to take 12 modules during the...
Study smarter with the SolutionInn App