Hello guys,
I need help with one task. I've to make a program which generates random numbers and stores them in an array. How many numbers to be extracted depends on the arrays length, which are parameters in the class constructor. The array needs to contain only one instence of each number, in a range from 100 to 1000, both limits included. I also need to find the smallest, largest and the average value of the numbers in the array and the absolute value closest to the average value. At last I need to print my result on a text area with JOptionPane.showMessageDialog.
When I've finished this class (UniqueNumber), I need to make a new class with my main-method, and test out all methods on UniqueNumber class.
How should I begin on this program? Could anyone give me some hints/tips for how I should start? I guess I need to declare some private fields for the Random generator, the array (private int[] randNum and private Random generator... Do I need something more?) and constructor for these fields.