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

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
  • 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.
Make sure you provide get and set methods for each instance variable defined in each class.
 Implement the Employee hierarchy defined in class with main program in
which you need to create an array/collection of Employee type - ex.

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!