I am trying to code my program to populate three different text files with randomly generated integers. The amount of integers in the text files are 10, 10 000, and 1 000 000. So the 'ten.txt' file will have 10 different, randomly generated numbers between 1 and 9. The '10k.txt' file will have 10,000 randomly generated numbers between 1 and 9,999 (and so on for the million file).
My program first populates the text files and then reads them back into three respective arrays. Each array is then ran three times against each of the four algorithms that I am including with my code. I then need to take an average of the three different running times for each of the three arrays (we are studying algorithm analysis).
I have always had difficulty understanding constructors so I would expect mine to be suspect.
I currently have the 10k and 1m text files properly filled, but for some reason, my 10-integer file stays blank. I am also having trouble reading the working files (10k/1m) back into their respective arrays.
I have two classes, ,my driver (main) and Algorithm (methods/algorithms). My main is by far still a rough draft as I recently made huge changes to accommodate the changing assignment.
Refer to post 3 for code.