Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use the chart for the code and do it in C++ please Lesson 3 - Lab Table: Priv. Priv. Protect Protect Contract ID. # Type
Use the chart for the code and do it in C++ please
Lesson 3 - Lab Table: Priv. Priv. Protect Protect Contract ID. # Type Office IFirst Name 1001 Full-Time MD & CEO Michael 2011 Part-Time Receptionist Maria 2010 Part-Time Administrator James 2012 Part-Time Office Assistant Kenny 1002 Full-Time Manager Kyndra Access Specifiers Protect Pub. Pub. Pub. Priv. Protect Protect Protect Expected Hours Days Annual Last Name Rate Per Day Worked Salary Gross YTD Ded. YTD Net YTD Smith 147,000.00 Rodriguez 20 10 14 Robert 25 8 12 Mercedes 22 12 12 Hernandez 75,000.00 Deductions (Public): Federal Tax - 20% of Gross State Tax - 10% of Gross Medical Plan - 5% of Gross Dental Plan - 3% of Gross Retirement Plan - 2.5% of Gross Note: Full-Time Gross = (Annual Salary/12/2 (Biweekly) Part-Time Gross Rate * Hours Per Day * Days Worked (Bi weekly) Net Pay = Gross - (All Deductions) Gross YTD += Gross Ded. YTD += (All Deductions) Report Format: ID. No.: Name: Lastname, Firstname Official Positon: Rate: Deductions Earnings Hours: Hours Per Day * Days Worked - (Part-Time only) Contract: Description Gross Pay Federal Tax - 20% State Tax - 10% Medical Plan - 5% Dental Plan - 3% Retirement Plan - 2.5% Sub-Total: Net Pay: ?????? ????? Lab-Homework - Use the table below to compute the biweekly salary for the employees. The data members must be defined under the access specifiers as indicated in the table. You may define all your member functions as public. You are expected to complete the following: 1. Transformers: a. Create a data entry member function (Transformers) that will be used to manually enter the data from the table to transform the data members (instance) of the object. b. Create a member function that computes the salary and updates data members to prepare them for printing 2. Iterators: a. Create a member function to print the pay slip. The function should only print earnings and deductions as specified in the report format. 3. From Main(): Object creation and initialization a. Create an object/variable for the MD & CEO. Call the data entry function in the class to enter the data manually. Call the function that computes salary. b. Create an array of objects for the remaining employees: Example: className objectArray[4]; and use the data entry function to manually enter each object's data from the table provided. Run the salary computation function on each of the objects in the array. 4. Print out the pay slips using the report format given. Note that the printing must be done from the Main(). Implies that private data (e.g., ID. No, names etc..) must be retrieved using observer functions. While you use the iterator function which you created in the class print the pay slip details. Have funStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started