[Solved]Create Program Consists Following Classes Abstract Class Employeel O Three Instance Vari Q37170064

Create a program that consists of the following classes: a. Abstract class Employeel that has . o three instance variablesoftypeStrings Empere . firstName lastName social Security Number o set and get methods for each instance variable o a constructor that takes three string arguments to be assigned to the instance variables o a method toString that returns a string representation for values of the instance variables toString that string an abstract method earnings that returns a double value o Class Employee2 that extends the abstract class Employeel and has: an instance variable weeklySalary of type double set and get methods for weeklySalary instance variable a constructor that takes one double argument and three string arguments to be assigned to the instance variables o o o o an implementation of the abstract method earnings that has been inherited from the class Employeel. The earnings method should calculate the earning based on the weeklySalary o a method toString that returns a string representation for values of the instance variables Class Employee3 that extends the abstract class Employeel and has: o an instance variable grossSales of type double o an instance variable commissionRate of type double o set and get methods for grossSales and commissionRate instance variables o a constructor that takes two double arguments and three string arguments to be assigned to the instance variables o an implementation of the abstract method earnings that has been inherited from the class Employeel. The earnings method should calculate the earning based on commissionRate and grossSales. o a method toString that returns a string representation for values of the instance Comnivariables Class Employee4 that extends the abstract class Employeel and has: an instance variable wage of type double an instance variable hours of type double set and get methods for wage and hours instance variables a constructor that takes two double arguments and three string arguments to be assigned to the instance variables o o o o o an implementation of the abstract method earnings that has been inherited from the class Employeel. The earnings method should calculate the earning based on wage and hours. o a method toString that returns a string representation for values of the instance variables extends class Emplyee3 which extends the abstract class Employeel and Class EmployeeS that haso an instance variable baseSalary of type double set and get methods for baseSalary instance variable o a constructor that takes three double arguments and three string arguments to be o an implementation of the abstract method earnings that has been inherited from the assigned to the instance variables class Employee1. The earnings method should calculate the earning based on base Salary and the two instance variables that were inherited from Emplyee3 which are commissionRate and grossSales. o a method toString that returns a string representation for values of the instance variables Create a classed called PayrollSystemTest to create an array of type Employee l that consists of four elements that uses downcasting to refer to four different instantiated objects of type Employee2, Employee3, Employee4, Employee5. Polymorphically call earnings and toString methods to display information about each object. b. Show transcribed image text Create a program that consists of the following classes: a. Abstract class Employeel that has . o three instance variablesoftypeStrings Empere . firstName lastName social Security Number o set and get methods for each instance variable o a constructor that takes three string arguments to be assigned to the instance variables o a method toString that returns a string representation for values of the instance variables toString that string an abstract method earnings that returns a double value o Class Employee2 that extends the abstract class Employeel and has: an instance variable weeklySalary of type double set and get methods for weeklySalary instance variable a constructor that takes one double argument and three string arguments to be assigned to the instance variables o o o o an implementation of the abstract method earnings that has been inherited from the class Employeel. The earnings method should calculate the earning based on the weeklySalary o a method toString that returns a string representation for values of the instance variables Class Employee3 that extends the abstract class Employeel and has: o an instance variable grossSales of type double o an instance variable commissionRate of type double o set and get methods for grossSales and commissionRate instance variables o a constructor that takes two double arguments and three string arguments to be assigned to the instance variables o an implementation of the abstract method earnings that has been inherited from the class Employeel. The earnings method should calculate the earning based on commissionRate and grossSales. o a method toString that returns a string representation for values of the instance Comnivariables Class Employee4 that extends the abstract class Employeel and has: an instance variable wage of type double an instance variable hours of type double set and get methods for wage and hours instance variables a constructor that takes two double arguments and three string arguments to be assigned to the instance variables o o o o o an implementation of the abstract method earnings that has been inherited from the class Employeel. The earnings method should calculate the earning based on wage and hours. o a method toString that returns a string representation for values of the instance variables
extends class Emplyee3 which extends the abstract class Employeel and Class EmployeeS that haso an instance variable baseSalary of type double set and get methods for baseSalary instance variable o a constructor that takes three double arguments and three string arguments to be o an implementation of the abstract method earnings that has been inherited from the assigned to the instance variables class Employee1. The earnings method should calculate the earning based on base Salary and the two instance variables that were inherited from Emplyee3 which are commissionRate and grossSales. o a method toString that returns a string representation for values of the instance variables Create a classed called PayrollSystemTest to create an array of type Employee l that consists of four elements that uses downcasting to refer to four different instantiated objects of type Employee2, Employee3, Employee4, Employee5. Polymorphically call earnings and toString methods to display information about each object. b.
Expert Answer
Answer to Create a program that consists of the following classes: a. Abstract class Employeel that has . o three instance variabl… . . .
OR

