PRO192_-_PE_-_SU_2024_-_Block_5_2614.webp
K

PRO192_-_PE_-_SU_2024_-_Block_5_2614.webp

public interface IString {
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 characters that are consonants in string str. (Consonants are defined as any letter in the English alphabet that is not a vowel (a, e, i, o, u). The count should be case-insensitive and exclude any non-alphabetic characters)
f2: Reverse the characters in each word of string str without changing the order of the words (word = a string without space(s)).
The program output might look something like:
1. Test f1()
1. Test f1()
2. Test f2()
2. Test f2()
5 of 5 Paper No: 1
Enter TC (1 or 2): 1
Enter TC (1 or 2): 2
Zoom FUD
+ 100%
Close
Chưa có bình luận nào.

Thông tin

Category
PRO192
Thêm bởi
Kusakabe2002
Ngày thêm
Lượt xem
4,332
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_PE_-_SU_2024_-_Block_5_2614.webp
File size
73.6 KB
Dimensions
1920px x 859px

Share this media

Back
Bên trên Bottom