Page 538 - Cs_withBlue_J_C11_Flipbook
P. 538
54 switch(ch)
55 {
56 case 'A':
57 case 'E':
58 case 'I':
59 case 'O':
60 case 'U':
61 v += ch;
62 break;
63 default:
64 c += ch;
65 }
66 }
67 }
68 nwWord = v + c;
69 }
70
71 void show()
72 {
73 System.out.println("Original word: " + word);
74 System.out.println("Rearranged word: " + nwWord);
75 }
76
77 public static void main(String args[])
78 {
79 modify obj = new modify();
80 obj.readWord();
81 obj.fVowelConsonant();
82 obj.arrange();
83 obj.show();
84 }
85 }
The output of the preceding program is as follows:
Enter the word: Computer
Frequency of vowels: 3
536536 Touchpad Computer Science-XI

