PRO192_-_FA_2024_-_Block_5_-_PE_3211.webp
Yuki1

PRO192_-_FA_2024_-_Block_5_-_PE_3211.webp

  • Media owner Yuki1
  • Ngày thêm
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
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRO192_-_FA_2024_-_Block_5_-_PE_3211.webp
File size
134.8 KB
Dimensions
1920px x 859px

Share this media

Back
Bên trên Bottom