java program
Q1. [10 pts] Implement the following classes' hierarchy: Abstract class E1. - It has two instance variables Name and Department (of type String). - A constructor that initializes the two instance variables to the specified values. The department should be either "IT" or "Accounting". If the user entered an invalid value for the department, the program should exist with error status. - Set and get methods to the instance variables. - toString0 method that returns the name and department of the employee - an abstract method workingHoursPerMonthO - an abstract method calculateSalary0 Class Manager: derived from class Employee - It has one instance variable NumEngineers (of type int) - A constructor that initializes all the instance variables. - workingHoursPerMonth 0 that implements the abstract method and returns the working hours of the manager per month. The working hours equals 140 if the manager works in the "IT" department and 120 if the manager works in the "Accounting" department. - calculateSalary0 that implements the abstract method and returns the salary of the manager. The salary is calculated as follows: salary = working Hours Per Month 20.8+ Number of Enigineers 10.5 - toString0 that overrides the superclass version and returns the name, department, Number of senior engineers supervised by the manager and the salary. Class SeniorEngineer: derived from class Employee. - It has one instance variable NumProjects (of type int). - A constructor that initializes all the instance variables. - workingHoursPerMonth( that implements the abstract method and returns the working hours of the engineer per month. The working hours equals 180 if the engineer works in the "IT" department and 160 if the engineer works in the "Accounting" department. - calculateSalaryOthat implements the abstract method and returns the salary of the employee. The salary is calculated as follows: salary = working Hours Per Month * 12.1+ Number of Projects 50.9 - toString( ) that overrides the superclass version and returns the name, department, Number of projects assigned to the engineer, number of junior engineers supervised by the senior engineer and the salary. Class JuniorEngineer: derived from class SeniorEngineer. - It has two instance TeamMembers (of type int) and SeniorEngineerSupervisor (of type String). - A constructor that initializes all the instance variables. - workingHoursPerMonthO that implements the abstract method and returns the working hours of the junior engineer per month. The method should be inherited from its direct superclass. - calculateSalaryOthat implements the abstract method and returns the salary of the employee. The salary is calculated as follows: salary = (working Hours Per Month * 15) / TeamMembers - toString O that overrides the superclass version and returns the name, department, assigned supervisor senior engineer, total team members, and the salary. Use the concept of polymorphism and write a test class named Test that has a main method to test your classes. In the main method, prompt the user to input the Employee information and then the type of employee. Display the information of the Employee as shown in the sample output using a reference of type employee only. Add comments when necessary and submit any associated files needed to compile the java application. Within each java file, add your name and ID. Include any additional files and zip them together. Sample output \#1: Enter the Employee information (Name, Department) Ahmad Accounting Enter the type of Employee: 1. Manager 2. SeniorEngineer 3. JuniorEngineer 1 Enter the number of Engineers supervised by this Manager: 15 The Manager information: Name: Ahmad, Department: Accounting, No of Engineers: 15, Salary: 2653.500 KD Sample output \#2: Enter the Employee information (Name, Department) Sarah Accounting Enter the type of Employee: 1. Manager 2. SeniorEngineer 3. JuniorEngineer 2 Enter the number of projects assigned to this Engineer: 3 The Manager information: Name: Sarah, Department: Accounting, No of Projects: 3, Salary: 2088.700 KD Sample output \#3: Enter the Employee information (Name, Department) Talal IT Enter the type of Employee: 1. Manager 2. SeniorEngineer 3. JuniorEngineer 3 Enter the number of Team Members: 6 Enter the supervising senior engineer: Sarah The Junior Engineer information: Name: Talal, Department: IT, Senior Engineer Supervisor: Sarah, No of Team Members: 7, Salary: 450KD