Rearrange Vowels ISC Computer Science 2019 Theory
A class Rearrange has been defined to modify a word by bringing all the vowels in the word at the beginning followed by consonants. Example : ORIGINAL becomes OIIARGNL Some of the members of the class are given below: Class name : Rearrange Data members/instance variables : wrd: to store a word newwrd: to store the rearranged word Member functions/methods : Rearrange(): default constructor void readWord(): to accept the word in uppercase void frequency(): finds the frequency of vowels and consonants in the word and displays them with an appropriate message void arrange(): rearranges the word by bringing the vowels at the beginning followed by consonants void display(): displays the original word along with the rearranged word Specify the class Rearrange, giving details of the constructor, void readWord(), void frequency(), void arrange() and void display(). Define the main() function to create an object and call the functions accordingly to enable the task. import java.util.Scanner; ...