subject

Modify the payroll system of Figs. 10.4-10.9 to include an additional Employee subclass Pieceworker that represents an employee whose pay is based on the number of pieces of merchandise produced. Class Pieceworker should contain private instance variables wage (to store the employee's wage per piece) and pieces (to store the number of pieces produced).
Provide a concrete implementation of method earnings in class Pieceworker that calculates the employee's earnings by multiplying the number of pieces produced by the wage per piece.
Create an array of Employee variables to store references to objects of each concrete class in the new Employee hierarchy. For each Employee, display its string representation and earnings.
Note: Here are the codes

// Fig. 10.8: .java
// class extends CommissionEmployee.
public class extends CommissionEmployee
{ private double baseSalary; // base salary per week
// six-argument constructor
public ( String first, String last,
String ssn, double sales, double rate, double salary )
{
super( first, last, ssn, sales, rate );
setBaseSalary( salary ); // validate and store base salary
} // end six-argument constructor

// set base salary
public void setBaseSalary( double salary )
{

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 15:00
Convert the quartstogallons class to an interactive application. instead of assigning a value to the number of quarts, accept the value from the user as input.
Answers: 2
question
Computers and Technology, 23.06.2019 08:00
Match the items with their respective descriptions.
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
To check whether your writing is clear , you can
Answers: 2
question
Computers and Technology, 24.06.2019 02:00
How are we able to create photographs differently than 100 years ago? explain your answer in relation to your photograph you selected.
Answers: 1
You know the right answer?
Modify the payroll system of Figs. 10.4-10.9 to include an additional Employee subclass Pieceworker...
Questions
question
Mathematics, 16.07.2019 08:40
question
Mathematics, 16.07.2019 08:40
Questions on the website: 13722362