PRO192_-_PE01_-_SP_2025_3490.webp
BichPhuong97

PRO192_-_PE01_-_SP_2025_3490.webp

☑Kizspy.me
Question 04: (03 marks)
Zoom
The interface IUtilities below is already given in Java code format, thus you can use it without
creating an IUtilities.java file:
<<interface>>
IUtilities
+ getLengthOfLongest Word(sentence:String):int
+ calculate Average Value(str:String):double
Write a class named MyUtilities, which implements the interface IUtilities. The class MyUtilities
implements all methods in IUtilities as below:
+ getLength Of Longest Word (sentence: String): int - return the length of the longest word (the word
with the most characters) in the string sentence. Suppose a sentence consists of words separated
by a space
+ calculateAverageValue(str: String): double - return the average of even digits in the string str
+ 100%
Close
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom