Using BufferedReader and FileReader..FileWriter?.. I have towrite a class with t
ID: 3616391 • Letter: U
Question
Using BufferedReader and FileReader..FileWriter?.. I have towrite a class with two methods:‘fillInRandom()’- should create a file called‘randomNums.txt’ filled with 100 random numbers, all ofwhich are between 1 and 20. There should be one number on eachline.
‘printFrequency()’ - determines how manytimes each number was present in the file, and displays theresult using a chart of stars. Inside this method, begin by readingin all of the values from the text file into an array of size 20.In other words, array[0] will keep track of the 1s, array[1]of the 2s, etc. Supopse to look somethign like this... 1: *******
2: *** 3: **** and so on... Using BufferedReader and FileReader..FileWriter?.. I have towrite a class with two methods:
‘fillInRandom()’- should create a file called‘randomNums.txt’ filled with 100 random numbers, all ofwhich are between 1 and 20. There should be one number on eachline.
‘printFrequency()’ - determines how manytimes each number was present in the file, and displays theresult using a chart of stars. Inside this method, begin by readingin all of the values from the text file into an array of size 20.In other words, array[0] will keep track of the 1s, array[1]of the 2s, etc. Supopse to look somethign like this... 1: *******
2: *** 3: **** and so on... Supopse to look somethign like this... 1: *******
2: *** 3: **** and so on...