Consider Java for this task:
I need you to write two methods described here:
1) The first method is:
I need this method to generate a random sample from an arraylist.
The population is the whole array and it should be constant.
The sample size should be constant two.
For example, if the population is 1000, the random sample is50.
This method is printing a random sample size as described hereit will start from 1 – 20 and pick a random and then start from21-41 and pick a random one and so on until it gets the sample wewant from the population.
2- The other method:
average method goes
OR
OR