Question: using java 2) Sorting Create a java program which gives the following choices on the command line to the user:- 1 - Sort by age
2) Sorting Create a java program which gives the following choices on the command line to the user:- 1 - Sort by age 2 - Sort by first name 3 - Sort by last name Once the user has made his/her selection, the system must sort by that parameter a pre-created list of employee objects. Employee (Integer id, String firstName, String lastName, Integer age). Note: 1) When sorting by first name - If the firstname of two employees are the same, then the system should then sort them by last name. 2) When sorting by last name - If the lastname of two employees are the same, then the system should then sorty them by last name. 3) Display all results on the console. 4) Use List to store all Employees. ) Write JUnit tests. Coverage should be atleast 70%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
