public int f1(String str);
public String f2(String str);
}
Write a class named MyString, which implements the interface IString. The class MyString implements methods f1 and f2 in IString as below:
f1: Count the number of odd numbers in the string str (number separated by non-numeric characters).
f2: Reverse the first word in str string that contains the most digits (word = a string without space(s)).
The program output might look something like:
1. Test f1()
1. Test f1()
5 of 5 Paper No: 3
2. Test f2()
2. Test f2()
Enter TC (1 or 2): 1
Enter TC (1 or 2): 2
Enter a string:
Enter a string:
a1 b12 c123 d1234 e12345
a1 b12 c123 d1234 e1234
Zoom
+ 100%
Close