Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For beginner java coding please make it simple and with scanner input thank you First define an Employee class which includes employee's name, salary and
For beginner java coding please make it simple and with scanner input thank you
First define an Employee class which includes employee's name, salary and hire date. The hire date contains three integers day, month and year. The Employee class contains methods to be able to access employee's name, salary and hire date. An employee can be created from the Employee class in one of the three ways: name only; or name and salary only; or name, salary and hire date of the employee. Creating an employee without any information is not allowed. Second, define a Supervisor class (subclass of the employee class). A supervisor is an employee with a year-end bonus and a status level: L for lower level manager and U for upper level position. In the main method in your program, declare an array of to hold at least ten employees (called emp_ary) which will be used to hold employee records. Enter the following employee information according to the instruction Name Salary Hire Date Supervisor Level Bonus Lori Green Mary Spade Joe Smith Jeff Berger April Apple John Smith Ginny Fernandez Paul Fullerton 50,000 47,000 54,000 63,000 41,000 65,000 69,000 71,000 3/4/2000 11/2/2001 5/7/1999 8/2/1995 4/23/2002 6/30/2003 1/20/2001 2/27/2004 yes yes yes L U L 5,000 7,000 4,500 a). Enter the first three records at the time these three employee objects (records) are created using the appropriate class constructor. b). Enter the name for the fourth and fifth record at the time the employee object (record) is created using the appropriate class constructor, and then use class methods to enter salary and hire date information from keyboard after the employee objects are created. c). Enter the remaining records of employee using the appropriate class constructor, and then use class methods to enter the rest fields (level and bonus) from keyboard. d). Now calculate the average salary of these employees and print the average. e) Sort the employee records by salary and print all employee records (name, salary and hire date as shown above) in descending order in salary. f). Resort the records by the income (including bonus) and print the result in descending order in income
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