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 23:20
How can you tell if someone sent you a text message to your email instead of a email
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Light travels at a speed of 186,000 miles a second. the distance light travels in a year is 5,865,690,000,000 miles/year 5,865,695,000,000 miles/year 58,656,950,000,000 miles/year 6,789,000,0000 miles/year
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Which one of the following functions is not available on the autosum tool? sum average if max
Answers: 3
question
Computers and Technology, 24.06.2019 16:50
7.23 main lab 7 - online shopping cart background this main lab extends the earlier prep lab "online shopping cart part 1". (you should save this as a separate project from the earlier prep lab). you will create an on-line shopping cart like you might use for your on-line purchases. the goal is to become comfortable with setting up classes and using objects. requirements this lab can be done individually or as pair programming. expanded itemtopurchase class (15 points) extend the itemtopurchase class as follows. we will not do unit testing in this lab so we will not be giving you the names of the member functions. create good ones on your own. create a parameterized constructor to assign item name, item description, item price, and item quantity (default values of "none" for name and description, and 0 for price and quantity). additional public member functions set an item description get an item description print the cost of an item - outputs the item name followed by the quantity, price, and subtotal (see example) print the description of an item - outputs the item name and description (see example) additional private data members a string for the description of the item. example output of the function which prints the cost of an item: bottled water 10 @ $1.50 = $15.00 example output of the function which prints the item description:
Answers: 1
You know the right answer?
Create an Employee subclass called PieceWorker. A PieceWorker represents an employee whose pay is ba...
Questions
question
Mathematics, 05.05.2020 08:12
question
Social Studies, 05.05.2020 08:12
question
Arts, 05.05.2020 08:12
Questions on the website: 13722367