Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi! Please write a C++ code that meets the requirements listed and comment each line. We use the How to Program Textbook by Deitel. And

Hi! Please write a C++ code that meets the requirements listed and comment each line. We use the How to Program Textbook by Deitel. And clearly mark where each file begins and ends. This is problem 14 from chapter 12 in the book. Please also show a screenshot of your final output. Thanks!

image text in transcribed

Here is a link to the supporting files:

https://www75.zippyshare.com/v/vxl5CzFX/file.html

https://www75.zippyshare.com/v/g1nXSoCQ/file.html

https://www75.zippyshare.com/v/UKcU9Ef7/file.html

https://www75.zippyshare.com/v/Se4zJ8NB/file.html

https://www75.zippyshare.com/v/wRQ3n0G8/file.html

https://www75.zippyshare.com/v/zZgVPymz/file.html

https://www75.zippyshare.com/v/NeF21xVT/file.html

https://www75.zippyshare.com/v/Mj7pwdWy/file.html

https://www75.zippyshare.com/v/j86PrA7t/file.html

OR

https://we.tl/t-mNBmAxkdL9

Or you can find them in chapter 12 of the Deitel 'How to code' book. They're 12.9-12.17.

Problem 12.14 (Payroll System Modification) Modify the payroll system of Figs. 12.9-12.17 to include an additional Employee subclasses PieceWorker and HourlyWorker. A PieceWorker represents an employee whose pay is based on the number of pieces of merchandise produced. An HourlyWorker represents an employee whose pay is based on an hourly wage and the number of hours worked. Hourly workers receive overtime pay (1.5 times the hourly wage) for all hours worked in excess of 40 hours Class Pieceworker should contain private insurance variables wage (to store the employee's wage per piece) and pieces (to store the number of pieces produced). Class HourlyWorker should contain private instance variables wage (to store the employee's wage per hour) and hours (to store the hours worked). In class Pieceworker, provide a concrete implementation of method earnings that calculates the employee's earnings by multiplying the number of pieces produced by the wage per piece. In class HourlyWorker, provide a concrete implementation of method earnings that calculates the employee's earnings by multiplying the number of hours worked by the wage per hour. If the number of hours worked is over 40. Be sure to pay the HourlyWorker for the overtime hours. Add a pointer to an object of each new class into the vector of Employee pointers in main. For each Employee, display its string representation and eanings Problem 12.14 (Payroll System Modification) Modify the payroll system of Figs. 12.9-12.17 to include an additional Employee subclasses PieceWorker and HourlyWorker. A PieceWorker represents an employee whose pay is based on the number of pieces of merchandise produced. An HourlyWorker represents an employee whose pay is based on an hourly wage and the number of hours worked. Hourly workers receive overtime pay (1.5 times the hourly wage) for all hours worked in excess of 40 hours Class Pieceworker should contain private insurance variables wage (to store the employee's wage per piece) and pieces (to store the number of pieces produced). Class HourlyWorker should contain private instance variables wage (to store the employee's wage per hour) and hours (to store the hours worked). In class Pieceworker, provide a concrete implementation of method earnings that calculates the employee's earnings by multiplying the number of pieces produced by the wage per piece. In class HourlyWorker, provide a concrete implementation of method earnings that calculates the employee's earnings by multiplying the number of hours worked by the wage per hour. If the number of hours worked is over 40. Be sure to pay the HourlyWorker for the overtime hours. Add a pointer to an object of each new class into the vector of Employee pointers in main. For each Employee, display its string representation and eanings

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

More Books

Students also viewed these Databases questions