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
Joined: Jul 22, 2000
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
Joined: Mar 18, 2001
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!!
Joined: Sep 29, 2000
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 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