Question: Implement the Employee hierarchy defined in class with main program in which you need to create an array/collection of Employee type - ex. named employees
- create an array/collection of Employee type - ex. named employees
- creats at least two objects of FixedPayEmployee, two objects of HourlyEmployee and two objects of Employee
- add those objects to the employees array/collection
- Go through the employees array, call each object's getMonthlyPay() and getInfo() and then print out the data returned by each call for each object.

Employee -name: String monchly Pay: double + get Monthly Pane double #get Infol). Styling 2 Main Program Class contarns the main Method Hourly Employee |-hourly Rate: double Fixed Poy Employee |-yearly Salary: double -hours Worked double Employee array/collection create a objects each of a -Hourly Employee Fixed Pay Emplonne Go through Employce call each object's get Monthly Pays getInfo() and print out Empbye my and Example in class - public class Student private String name; private int age; public Student(String nName, int nAge) setName(nName); setAge(nAge): } public String getName(X return name; } public void setName(String newNamex name = newName; 3 public int getAge(X return age; } public void setAge(int newAge) if(newAge>0 && newAge
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
