#124834
Java Help
Hey dudes, in case some of you didn't know I'm currently at a summer program at Cornell University in Upstate New York. Everything here is nice and dandy, but I need a hell ton of help in Java (which to be fair I'm considering dropping because I find it to ridiculously hard for me, I'm not too much a computer language guy). I've been having massive problems with this and its really getting to me. If any of you can find it in your heart to help me I would be most grateful.
This is the question I'm working on (Which is due tonight btw)
q1. Write a Java program to read in a file of text. The text in the file will comprise multiple lines, and each line will have a pair of numbers and an operation (eg "twentyone plus fourteen"). Your program should output the answers in the format "21 + 14 = 35", thus converting the text to numerical values and interpreting the textual operator as an arithmetic operation. You should not store all possible textual versions of numbers (we will only work with input text for numbers between 0 and 999), but should write code which can parse expressions like "seventythree" into "seventy" and "three" (we will make large numbers into single words, not separated by spaces, as illustrated here, though may write 347 as either "threehundredandfortyseven" or "threhundredfortyseven").
The only 'operators' will be "plus", "minus", "times", "multipliedby", "dividedby", "remainderondividingby", and "modulo" (which means the same as remainder on dividing by). Your program should print the answers to the screen and to a file called my_output.txt. Some comments on style: you should not put everything into the main method, and should construct such other classes as help to make the program more cleanly organised.
I've tried multiple ways of doing this and nothing works out for me
This is the question I'm working on (Which is due tonight btw)
q1. Write a Java program to read in a file of text. The text in the file will comprise multiple lines, and each line will have a pair of numbers and an operation (eg "twentyone plus fourteen"). Your program should output the answers in the format "21 + 14 = 35", thus converting the text to numerical values and interpreting the textual operator as an arithmetic operation. You should not store all possible textual versions of numbers (we will only work with input text for numbers between 0 and 999), but should write code which can parse expressions like "seventythree" into "seventy" and "three" (we will make large numbers into single words, not separated by spaces, as illustrated here, though may write 347 as either "threehundredandfortyseven" or "threhundredfortyseven").
The only 'operators' will be "plus", "minus", "times", "multipliedby", "dividedby", "remainderondividingby", and "modulo" (which means the same as remainder on dividing by). Your program should print the answers to the screen and to a file called my_output.txt. Some comments on style: you should not put everything into the main method, and should construct such other classes as help to make the program more cleanly organised.
I've tried multiple ways of doing this and nothing works out for me
Last edited July 9, 2012 at 1:47 PM by neosdark