Page 490 - computer science (868) class 11
P. 490

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


                488488  Touchpad Computer Science-XI
   485   486   487   488   489   490   491   492   493   494   495