Write a program SeventeenCounter
that:
Integer
ArrayList
with 1000 random numbers between 0 and 99 inclusive, and17
appears in the list. (What would you expect the answer to be, on average?)Then, write a program ValueCounter
that creates the same random ArrayList
, and uses a separate Array
to keep track of how many times each value, 0-99 inclusive, appears in the ArrayList
. Have the program report the results. (How would you expect the values to be distributed, on average?)