Ask your own question, for FREE!
Computer Science 16 Online
OpenStudy (hba):

Consider the following URLs http://files.seds.org/pub/software/text/weather.txt http://files.seds.org/pub/software/text/robotic.txt Scan each file of above URLs and count the frequency of each word in these files separately. Once you calculate the frequencies then store it in another text file line by line as follows. 166 a 25 and 11 as 3 command Build a binary search tree for each URL where each node of binary search tree consists of a word and corresponding frequency calculated above. The node of a tree is shown below. Assume you program is not case sensitive

OpenStudy (hba):

@UnkleRhaukus @wio @malihe @nuz93

OpenStudy (anonymous):

Show some code so it looks like you tried yourself before just asking someone else to do your homework.

OpenStudy (hba):

package frequency; import java.util.*; import java.io.*; public class Frequency { public static void main(String[] args) { String fileName = "C:\\Users\\studentlab2\\Desktop\\weather.txt"; String line=null; try { FileReader fileReader = new FileReader(fileName); BufferedReader. BufferedReader bufferedReader = new BufferedReader(fileReader); while((line = bufferedReader.readLine()) != null) { String[] var = line.split(" "); for (int i=0;i<var.length;i++) { System.out.println(var[i]); } } bufferedReader.close(); } catch(FileNotFoundException ex) { System.out.println( "Unable to open file '" + fileName + "'"); } catch(IOException ex) { System.out.println( "Error reading file '" + fileName + "'"); }

OpenStudy (hba):

@seandisanti

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!