Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

package ics 1 2 5 _ example _ 0 2 ; public class Employee { / / total number of Employee objects created is stored

package ics125_example_02;
public class Employee {
// total number of Employee objects created is stored in count
private static int count =;
private final String firstName;
private final string lastName;
// initialize Employee, add 1 to the count and
// display the String indicating that constructor was called
public Employee(String firstName, String lastName){
this. FirstName = firstName;
this. lastName = lastName;
}
count;
public string getFirstName(){
}
return firstName;
public String getLastName(){
return lastName;
}
public static int getcount(){
return count;
}
public float calculatePay(){
3
return ;
}// end class Employee
package ics125_example_02;
public class SalaryEmployee extends Employee {
private final int paystep;
public SalaryEmployee(String firstName, String lastName, int payStep){
super(firstName, lastName);
this. paystep = paystep;
}
@override
public float calculatePay(){
// return the biweekly pay amount for the employee based on pay step
18
step amount paid
$100
$250
$500
*1
$750
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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