PRO192_-_PE02_-_SU_2025_4005.webp
T

PRO192_-_PE02_-_SU_2025_4005.webp

OUTPUT:
✓ Kizspy.me
5000.00
Question 4:
6-Hoang Minh-6000.00-8
Question 04: (03 marks)
The interface IDataProcessor below is already given in Java code format, thus you can use it
without creating an IData Processor.java file.
<<interface>>
IDataProcessor
+findLargest Number(strInput: String): int
+ calculate AverageNumbers(strInput: String): double
Write a class named DataHandler, which implements the interface IData Processor. The class
Data Handler implements all methods in IData Processor as below:
+findLargest Number(strInput: String): int - return the largest integer in the string strinput
+calculateAverageNumbers(strInput: String): double return the average of all integers in the
string strinput.
Hints: Assuming that the string strinput consists of words separated by a space, a word can be a
string of letters or a string of digits (positive integer). You can refer to the split() method of the
String class.
Zoom
+100%
Close
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom