a. You created an application named DrugTests that produces a list of randomly selected employees who will

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 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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java Programming

ISBN: 978-1337397070

9th edition

Authors: Joyce Farrell

Question Posted: