Write a class named MyString, which implements the interface IString. The class MyString implements methods f1 and f2 in IString as below:
f1: Count of words with at least one letter (word = a string without space(s)).
f2: Return the string by removing the last word in the string str (word = a string without spaces).
The program output might look something like:
1. Test f1()
1. Test f1()
2. Test f2()
2. Test f2()
Enter TC (1 or 2): 1
Enter TC (1 or 2): 2
5 of 5
Paper No: 8
Enter a string:
a a1 2b cd 1 12 b
personal computer
OUTPUT:5
Enter a string:
OUTPUT:nersonal
Zoom
75%
Close