Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Prints each letter of a given string (one per line).
- * @param myName A string to analyze
- */
- public static void printEachLetter(String myName)
- {
- for (int i=0; i < myName.length; i++)
- {
- system.out.pritnln(myName.charAt(i));
- }
- }
- /**
- * Determines if the given letter is a vowel.
- * @param a The letter to analyze
- * @return True if the letter is a vowel, false otherwise. Y will not be considered a vowel.
- */
- private boolean isVowel(char ltr)
- {
- if (ltr == 'a' || ltr == 'e' || ltr == 'i' || ltr == 'o' || ltr == 'u')
- return true;
- else
- return false;
- }
- /**
- * Prints only the vowels in a given string (one per line).
- * @param myName The string to analyze
- */
- public void printVowels(String myName)
- {
- // your code goes here
- }
- /**
- * Returns a backwards copy of the original string.
- * @param original The original string to analyze
- * @return A backwards copy of the original string
- */
- public String backwardsString (String original)
- {
- // replace the body of this method
- return "";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement