Question: (15 pts. You may use an array to test whether the random generator is fair; that is, whether each possible value is generated approximately the


(15 pts. You may use an array to test whether the random generator is fair; that is, whether each possible value is generated approximately the same number of times and its percentage. User decides: How many random numbers should be generated? What is the number of values for each random draw and its percentage? (e.g., 10) After all numbers have been generated, print the counters. Here is a typical program run: How many random numbers do you want to generate? 5000 What is the number of values for each random draw? 10 No Num. of Perc. (%)Values 10.34% 10.04% 0 1 2 3 4 5 517 502 496 514 484 506 487 493 517 484 6 7 9.92% 10.28% 9.68% 10.12% 9.74% 9.86% 10.34% 9.68% 8 9 What is the Java code for your program? (10 pts.) Show the operation of 17 +(-14) in one's complement of binary number system. Assume that each binary number is represented with 10 bits. 75
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
