• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

please help me with this simple...

 
john andersson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9065
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you thought about the logic behind these? Can you post your pseudocode?
 
Geoff Griffiths
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic