The file text.txt contains a sentence text written in all small letters and does not have any punctuation marks, no numbers, no symbols except for spaces.
You are required to write a program which accepts an operation code, and zero to two inputs depending on the operation code. Based on the operation code, you will call three versions of the overlaoded function textProcessing as follows:
Operation 0: The function removes all vowels from the ORIGINAL sentence. The vowels considered are the small letters (a, e, i, o, u y, and w).
Operation 1: The code further asks for one lowercase letter to be input by the user. If the character is not a lower case letter, the code outputs Invalid. The function returns the distance (difference) between the letter first occurence and last occurence in the text. If the letter does not occur in the sentence, it returns 0.
Operation 2: The code asks for two lowercase letters to be input by the user. If the characters are not lower case letters, the code outputs Invalid. The function replaces the original letter by the new letter in the ORIGINAL string.
Any other opcode: the code outputs Invalid.
Program Input:
A single line that takes in an operation code.
Zero or one or two lower case letters depending on the operation code
Program Output:
Depends on the function called and as specified above