Answered step by step
Verified Expert Solution
Question
1 Approved Answer
package ics 1 2 5 _ example _ 0 2 ; public class Employee { / / total number of Employee objects created is stored
package icsexample;
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 to the count and
display the String indicating that constructor was called
public EmployeeString 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
return ;
end class Employee
package icsexample;
public class SalaryEmployee extends Employee
private final int paystep;
public SalaryEmployeeString firstName, String lastName, int payStep
superfirstName lastName;
this. paystep paystep;
@override
public float calculatePay
return the biweekly pay amount for the employee based on pay step
step amount paid
$
$
$
$
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started