A class Encrypt has been defined to replace only the vowels in a word by the next
  corresponding vowel and forms a new word. i.e. A → E, E → I, I → O, O → U and U → A
  Example: Input: COMPUTER
  Output: CUMPATIR
  Some of the members of the class are given below:
  Class name : Encrypt
  Data members/instance variables:
  wrd : to store a word
  len : integer to store the length of the word
  newwrd : to store the encrypted word
  Methods / Member functions:
  Encrypt( ) : default constructor to initialize data members with legal initial values
  void acceptword( ) : to accept a word in UPPER CASE
  void freqvowcon( ) : finds the frequency of the vowels and consonants in the word stored in ‘wrd’ and displays them with an appropriate message
  void nextVowel( ) : replaces only the vowels from the word stored in ‘wrd’ by the next corresponding vowel and assigns it to ‘newwrd’, with the remaining alphabets unchanged
  void disp( ) : Displays the original word along with the encrypted word
  Specify the class Encrypt giving details of the constructor( ), void acceptword( ),
  void freqvowcon( ), void nextVowel( ) and void disp( ). Define a main( ) function to
  create an object and call the functions accordingly to enable the task.
        
Solution:
,,,
 
undefined                                                                  


                                            



Contact Us

REACH US

SERVICES

  • CODING
  • ON-LINE PREPARATION
  • JAVA & PYTHON

ADDRESS

B-54, Krishna Bhawan, Parag Narain Road, Near Butler Palace Colony Lucknow
Contact:+ 919839520987
Email:info@alexsir.com