subject

Create an Employee subclass called PieceWorker. A PieceWorker represents an employee whose pay is based on the number of pieces of merchandise produced.

Class PieceWorker should contain private data member wage (to store the employee’s wage per piece) and pieces (to store the number of pieces produced). provide a concrete implementation of:

The Constructor
Member function earnings that calculates the employee’s earnings by multiplying the number of pieces produced by the wage per piece.
The implementation of the above methods should be done outside the PieceWorker class.

Note: the implementation of the Employee class is provided here:

class Employee {

public:

Employee(const string& first, const string& last, const string& ssn)

: firstName(first), lastName(last), socialSecurityNumber(ssn) {}

virtual ~Employee() = default;

virtual double earnings() const = 0;

private:

std::string firstName;

std::string lastName;

std::string socialSecurityNumber;

};

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:30
Who needs to approve a change before it is initiated? (select two.) -change board -client or end user -ceo -personnel manager -project manager
Answers: 1
question
Computers and Technology, 24.06.2019 08:30
Aconsumer would pay an extra they used the rent to own program to buy the computer, rather than using cash. for all of the items, is the cheapest option over the life of the contract. the most expensive overall option is to use purchase the item.
Answers: 2
question
Computers and Technology, 24.06.2019 15:30
If you want to delete an entire word at a time, which key should you press along with the backspace or delete key?
Answers: 1
question
Computers and Technology, 24.06.2019 23:00
Systolic pressure is a measure of blood pressure when the ventricles relax and fil with blood ture or false
Answers: 1
You know the right answer?
Create an Employee subclass called PieceWorker. A PieceWorker represents an employee whose pay is ba...
Questions
question
Medicine, 04.09.2020 20:01
question
History, 04.09.2020 20:01
question
Mathematics, 04.09.2020 20:01
question
Mathematics, 04.09.2020 20:01
question
Mathematics, 04.09.2020 20:01
Questions on the website: 13722367