/* Laboratory Assignment For Tuesday of Week of 4/10/04 1) Given a word, find if it starts and ends with a vowel. Your method should take a String as input parameter. It should print the result (yes/no). The return type should be void. */ class StrVowel{ public void compare(String str) { int length = str.length(); char a=str.charAt(0); if(a=='a' || a=='e' || a=='i' || a=='o' || a=='u') { a=str.charAt(length-1); if(a=='a' || a=='e' || a=='i' || a=='o' || a=='u') { System.out.println("\n Yes \n"); return; } } System.out.println("\n No \n"); } } class soln9tue1 { public static void main(String args[]){ MainWindow mainWindow; InputBox inputBox; OutputBox outputBox; boolean out ; StrVowel b=new StrVowel(); mainWindow = new MainWindow(); mainWindow.setVisible(true); inputBox = new InputBox(mainWindow); String str; str= inputBox.getString("Please enter the String"); b.compare(str); } }