PRO192_-_PE_-_SP_2024_-_Block_5_1920.webp
E

PRO192_-_PE_-_SP_2024_-_Block_5_1920.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 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
Zoom

78%

Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRO192_-_PE_-_SP_2024_-_Block_5_1920.webp
File size
97.5 KB
Dimensions
1193px x 792px

Share this media

Back
Bên trên Bottom