View Single Post
Old 11-12-2013, 01:08 PM   #4
Recon604
My dinner reheated before my turbo spooled
 
Join Date: Feb 2011
Location: Vancouver
Posts: 1,745
Thanked 691 Times in 275 Posts
Failed 155 Times in 43 Posts
Quote:
Originally Posted by ForbiddenX View Post
Do you have any progress done or specific questions? I can try and help. Probably won't be learning too much if you're just given the answers though :P
only got the part to read the input for file

Quote:
Originally Posted by c_loke View Post
Try breaking the problem down a bit. I'll take #2 for example.

You know that you have to get the works into a string array but to do this you first need to get the string of words. The string of words will need to come from somewhere, and in your case, it will come from a file. You then need to figure out how to read a text file to string.

How to create a Java String from the contents of a file? - Stack Overflow

First google search btw.

After you read in the file, you need to determine how you are going to split the words. Well you might want to split on the sentences, so you might have something that says

String [] words = stringofwords.split(" ");
perfect! ill try to write it. Any of you are expects with java?
Recon604 is offline   Reply With Quote