Originally posted by Pauline McNamara:
This is where you're off a little. You could make it work like this, but one of the goals of this assignment is to create your own methods.
Can you think of things that get repeated in an array like that? Maybe there's a way to reduce the lines of code you need for arrays.
Of course, you'd need a method to put the right combination of things together...
Cryptically yours ,
Pauline
Right, now..........
I got my program to work the long-winded and silly way. :roll:
But now I want to do it the sensible and efficient way.
I know how to create methods.
But I am at a loss as to what I'd want my method(s?) to do in this case.
Based on the hints I have been told so far in this
thread, I'm going to construct an array to hold the values [nought, all the way through, to nine], i.e., [nought, one, two, three, four....etc].
Then, i want to be able to take keyboard input from the user, and charcater by character, read this input - perhaps using a stringbuffer(??).
That is, read one character, and if two characters are entered, then read both of them.
No, sorry, i've lost it. I can't see what i have to do.