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, 23.06.2019 08:30
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
question
Computers and Technology, 23.06.2019 15:00
In the blank libreoffice writer document, to start the process of entering a date field into a letter, click on the insert menu. edit menu. file menu. fields menu.
Answers: 3
question
Computers and Technology, 24.06.2019 01:10
Create a program that will take in a single x and y coordinate as the origin. after the input is provided, the output should be all of the coordinates (all 26 coordinates read from the “coordinates.json” file), in order of closest-to-farthest from the origin.
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Append and make table queries are called queries. select complex simple action i think action
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, 10.09.2021 22:40
question
Mathematics, 10.09.2021 22:40
question
Mathematics, 10.09.2021 22:40
question
Mathematics, 10.09.2021 22:40
question
Mathematics, 10.09.2021 22:40
question
Mathematics, 10.09.2021 22:40
Questions on the website: 13722361