Input a word in uppercase and check for the position of the first occurring vowel and perform the following operation.
(i) Words that begin with a vowel are concatenated with “Y”.
For example, EUROPE becomes EUROPEY.
(ii) Words that contain a vowel in-between should have the first part from the position of the vowel till the end, followed by the part of the string from beginning till the position of the vowel and is concatenated by “C”.
For example, PROJECT becomes OJECTPRC.
(iii) Words which do not contain a vowel are concatenated with “N”.
For example, SKY becomes SKYN.
Design a class Rearrange using the description of the data members and member functions given below:
Class name: Rearrange
Data Members/instance variables: Txt: to store a word
Cxt: to store the rearranged word
len: to store the length of the word Member functions:
Rearrange (): constructor to initialize the instance variables
void readword (): to accept the word input in UPPER CASE
void convert (): converts the word into its changed form and stores it in string Cxt
void display(): displays the original and the changed word
Specify the class Rearrange giving the details of the constructor (), void readword ( ), void convert () and void display ().
Define a main () function to create an object and call the function accordingly to enable the task.