Question: JAVA: Create a program that uses a linkedlist (build your own) to order employees around based on a time interval and randomly choose the employees
JAVA: Create a program that uses a linkedlist (build your own) to order employees around based on a time interval and randomly choose the employees to come in at that time. There are 20 employees labelled 1-20. The program must first pick a random number between 1.0-11.0 (decimals are used for now), signifying the hour an employee came in. Employees 1-5 must come in between 1 to 5PM. Employees 6-15 must come in between 5PM to 8PM and Employees 16-20 must come in between 8PM to 11PM Example: The program picks a random number(time interval) between 1.0-11.0. It picks 7.4, which is a number between 5.0 to 8.0, therefore it must now call up a random employee by picking a number between 6-15 to come in and places that employee into its time interval. This process should be repeated 100 times. If it runs again and picks a time interval between 5PM and 8PM and happens to pick the same employee again it should stored as well. At the end it must output the list of employees and the time that they all entered. They must be ordered by the time they came in. Employee 2 entered at 1.2PM Employee 3 entered at 1.8PM Employee 1 entered at 3.1PM Employee 1 entered at 3.4PM Employee 2 entered at 4.1PM Employee 5 entered at 4.4PM Employee 4 entered at 4.8PM Employee 10 entered at 5.3PM Employee 14 entered at 6.0PM Employee 6 entered at 6.2PM .... until we run this 100 times
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
