wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes please help me with this simple... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "please help me with this simple..." Watch "please help me with this simple..." New topic
Author

please help me with this simple...

john andersson
Greenhorn

Joined: Apr 21, 2001
Posts: 1
took introduction to java this semester, but unfortunatly i missed some classes. now i'm sitting here and have some programs due monday, but i don't now where to start! please, please help me!
here's what i need to do:
Write a Java program [utilizing ConIO.java or FormIO.java] that counts the individual numbers of each vowel ('a', 'e', 'i', 'o', 'u') in a user-input string (don't forget that the input may be upper- or lower-case).
2. (Palindrome.java)
Write a Java program [ utilizing ConIO.java or FormIO.java] that tests whether a user-input string is a palindrome, which is a string such as "otto" that reads the same in both directions.

3. Write a method
String numToWord(String s)
that takes a string argument representing an integer between 0 an 99999 and return the word equivalent. For example, for s="423", the method would return the String "four hundred twenty three".
4. Write the body of the method
boolean isSum(int x, int y, int z)
that returns true if any one of x, y, and z is the sum of the other two and returns false if they are nor.
Provide test (main) methods to see that the methods perform as described.

i'll apriciate any kind of help,
amhere
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
Have you thought about the logic behind these? Can you post your pseudocode?

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Geoff Griffiths
Greenhorn

Joined: Mar 18, 2001
Posts: 17
try assignment4 at the cattle drive on this site. it is the same as one of your questions and gives hints on how to do it. It should also help with your other questions too!!
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
OK, Let's start with number 1. Since none of us is in the class, we don't have the benefit of knowing just what in the world is ConIO.java or Form.java - so you will need to modify any suggestions to utilize the existing stuff.
The user is going to key in at the prompt
>java VowelCounter WhateverTheInputIs
I will assume that only one parameter is going to be dealt with.
Your program needs to have a main method that looks at args[0] to get that parameter. Remember that args[] is an array of Strings. You will need to process just one of those Strings as an array of characters checking it one at a time.

When you get this compiled and running, come back and we can discuss the other 3 problems.
[This message has been edited by Cindy Glass (edited April 23, 2001).]


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
wood burning stoves
 
subject: please help me with this simple...
 
Similar Threads
small swapping problem please please reply!!!!!
Apply function names as parameters in other functions
Graphics2D and Math classes in an Applet
Several questions about this program
How to make our own jar files and how to acess the methods in the jar