Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I've checked my question. package ics 1 2 5 _ example _ 0 2 ; public class CommissionEmployee extends Employee { private double grossSales; private

I've checked my question.
package ics125_example_02;
public class CommissionEmployee extends Employee {
private double grossSales;
private double commissionRate;
public CommissionEmployee(String firstName, String lastName,
double grossSales,
double commissionRate){
super(firstName,lastName);
this.grosssales =gross5ales;
this commissionRate =commissionRate;
}
@override
public float calculatePay(){
//return the biweekly earnings for a commission employee
I*
Confirm commission rate is between 0.0and 1.0.
If the rate is not between \theta .\theta and 1.\theta ,set the rate to zero.
Confirm the gross sales is larger than 0.0.
If the gross sales is less than \theta ,set the gross sales to zero.
Calculate the earnings to be the rate times the sales.
}
}
//end class CommissionEmployee
package ic5125_example_02;
public class ICS125_Example_020
public static void main(String[]args){
//track the total amount paid for all employees.
float total =\theta ;
Employee[]office new SalaryEmployee ("Bill","Brown",2),
new CommissionEmployee("Sue","Black",1000,0.1),
new CommissionEmployee("Pat","Green",2000,0.2),
new SalaryEmployee("Amy","Redd",3)
};
System.out.printf("Payment this period:%n");
/)Print for each employee:
Emplayee Bill Brown earns $250.00
etc.
System.out.printf("Total pay out is %7.2%%",total);
}
}/end class ISC125_Example_82

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

Explain all drawbacks of the application procedure.

Answered: 1 week ago

Question

Determine Leading or Lagging Power Factor in Python.

Answered: 1 week ago