Question: a. You created an application named DrugTests that produces a list of randomly selected employees who will be tested each week for the next 52

a. You created an application named DrugTests that produces a list of randomly selected employees who will be tested each week for the next 52 weeks. Now modify the program to include a count and display of the number of times each employee is selected. Also display a list of employee numbers that never were selected for testing. Save the program as DrugTests2.java.

b. When a series of random numbers is generated, it is quite common for the same number to be selected consecutively multiple times. Although duplicates happen in randomized lists, humans tend to see such repetition as “unfair.” Modify the DrugTests2 class so that if an employee number is selected immediately after it was already selected, a new number is selected for the week. Also display a message explaining that a new number is being selected. Save the file as DrugTests3.java.

Step by Step Solution

3.44 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a public class DrugTests2 public static void ma... View full answer

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 Java Programming Questions!