☑Kizspy.me
}
public int f1(String str);
public String f2(String str);
Write a class named MyStringProcessor, which implements the interface IStringProcessor. The class
MyStringProcessor implements methods: f1 and f2 in IStringProcessor as below:
•
•
f1: Count the number of lower vowels (a, e, i, o, u) in the input string str (case-sensitive). Return
the total count of vowels.
f2: Find the longest word in the input string str (a word is defined as a substring between spaces).
Return the longest word. If there are multiple words with the same longest length, return the
first one encountered.
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
Enter a string:
Zoom
+ 89%
Enter a string:
This is a string with some words
Close