Due by the end of this meeting
passRate(int numElts, Random rand, List<Integer> list)
.
This method generates a list of numElts
values using rand.nextInt(101)
.
It then goes thru all those numbers
counting how many are gretaer than or equal to 50.
(It neither prints nor returns the count!
I just want it to do the counting.
Compare the randomAccess
method.)
testPassRate
that compares how long it takes
to count the passing grades using an ArrayList
versus a LinkedList.
(Base it on testRandomAccess
.)
Call this method from main
(right after testRandomAccess
).
Run the program several times,
and add a comment
(in main
right after the call to testPassRate
)
saying whether ArrayLists
or LinkedLists are faster,
or whether they're about the same.
Submit this/these files: