This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes creating a method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "creating a method" Watch "creating a method" New topic

creating a method

ione walker
Ranch Hand

Joined: Apr 19, 2001
Posts: 31
on the cattle Drive Assignment Java-4a (Say)
one of the "things you need to know" is
how to make your own methods.
I was able to do the assinment without makeing a method.
In fact when I tried the thing no longer worked.
I would like any sugestions on improvements to the code.
/*Write a program that will read in a number from 0 to 99 and spell out that number. The program must also report any values that are out of range.
In other words, I want to type
java Say 22
and see
(Please do not post solutions to the Cattle Drive assignments. The other folks need to think it through for themselves. I am SURE that you will get lot's of comments from the Cattle Drive nit-pickers when you send it in. Thanks - Cindy)
thanks for your help in clearing this up for me.
Ione Walker
Troy MI
[This message has been edited by Cindy Glass (edited April 30, 2001).]

=======================<BR>Ione Walker<BR><BR>========================
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Sorry that I had to do that, but that's how the rules go.

"JavaRanch, where the deer and the Certified play" - David O'Meara
ione walker
Ranch Hand

Joined: Apr 19, 2001
Posts: 31
sorry I forgot!

Originally posted by Cindy Glass:
Sorry that I had to do that, but that's how the rules go.

Greg Tuck
Ranch Hand

Joined: Apr 27, 2001
Posts: 30
I concur - I saw no need for a method for the first Say assignment.
I used only two methods for the second part.
(And I won't give anything away by saying what I used them for, okay Cindy?)

Technical Manager, International Assignment Services<BR>Deloitte & Touche, LLP
jQuery in Action, 2nd edition
subject: creating a method
Similar Threads
Collections - I just don't understand!
College dropout
creating a method / Assignment Java-4a (Say)
Cattle Drive (java college)
program assignment