1.) Write a Java class that generates a random integer (between 1 and 250). Call the
class GenKeys. GenKeys should have a least one method that returns the integer
random number. Gen Keys should not have a main method.
2.) Write a Java Program called MainProg that does have a main method. This class
should create an instance of GenKeys and use it to randomly generate integers.
We will call these integers keys.
3.) MainProg should write keys, each on their own line, in a file called “keys.txt”.
Ultimately your program should generate and write to file 500 keys.
4.) MainProg should then read all of the keys from “keys.txt”, and store them in an
array, removing any duplicates. (In other words if the number 55 is generated
twice, only one of these 55’s should be added to the array). Note that your final
array will contain less than 500 keys. Now, write the remaining keys into a file
called “sorted.txt”, one key per line, with the smallest number on the first line
and the largest file on the last line.