Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

# Joseph Russell

Ranch Hand
since Jan 08, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
Ranch Hand Scavenger Hunt
Greenhorn Scavenger Hunt

## Recent posts by Joseph Russell

It's a bumpy, yet enjoyable, ride. Welcome aboard.
18 years ago
No, not at all. I feel inspired by your speech.
18 years ago

In this particular case an iterative approach works just as well as a recursive approach. A method does not need to be recursive to use a value that a previous call to the same method returns.

Thanks, that gives me an idea. After I finally pass this I would like to try a recursive approach but I would like to pass it first...
18 years ago
My problem is not how to solve 4b, I solved a while ago. Rather it is do I solve it recursively or not. This nitpick seems to indicate that a recursive method is the way to go while this thread says not too. I do not want to proceed coding this problem until I know for sure what is the most efficient or accepted way.
Nitpick:
"Instead of a switch statement, you could have workIt return a number value to be used in the next call to workIt, and put the number %= ... equation in the method itself."
Marilyn if you could send that to me I would appreciate it. Thanks!
[ May 24, 2003: Message edited by: Joseph Russell ]
18 years ago

Rick and people like him need to understand that RCC is an institution of faith not science.

Are you trying to say that science is never wrong?
18 years ago
In my last attempt I used a switch statement by evaluating the length of the number and then having the number "fall" through the switch statements each time being passed to a method that will "say" the first three digits of the number, cut itand then have it fall back down the chain. However, this the nitpick I received:
<quote>Instead of a switch statement, you could have workIt return a number value to be used in the next call to workIt, and put the number %= ... equation in the method itself.</quote>
I have tried to make a recursive method and am failing at it...then I find this thread that says not to solve this with recursion.
I'm lost.
18 years ago
Chewin' the fat?
18 years ago
Welocome Sherry!
18 years ago
whip cream
18 years ago
It's lonely being invisible...
18 years ago
Goob Job Carol! Speech! Speech!
18 years ago
Thanks. It's good to see friendly faces around these parts.
18 years ago

I was sooo disappointed after the first viewing of Matrix, the story was so full of holes ... but then I realised I was taking it far too seriously and now I really like it for what it is, a neat what-if idea dressed up with cool fighting and gun-porn.

Gun porn.
18 years ago
"uvaque conspecta livorem ducit ab uva"
http://www.geocities.com/danidarc/dove/text/uva.txt
18 years ago