PRO192_-_PE01_-_SP_2025_3490.webp
BichPhuong97

PRO192_-_PE01_-_SP_2025_3490.webp

☑Kizspy.me
information:
WatchList
+ addWatch(watch: Watch):void
+filterBy Brand(value: String): WatchList
+findMostExpensive(): Watch
Where:
• addWatch(watch: Watch):void - add a
new watch to the Watch List collection
⚫ filterByBrand(value: String): Watch List -
return a list of watches that the brand is
equal to the value if found, otherwise
return null. The string comparison is case-
insensitive.
⚫ find Most Expensive(): Watch - return the
watch with the highest price in the list.
Suppose in the list there is only one watch
with the highest price.
Hints: to declare the WatchList class, you can use the following statement:
public class WatchList extends ArrayList<Watch>{
}
II....
The program output might look something like this (using the Watch List class):
The watches have been added:
The watches have been added:
Zoom
+ 100%
The watches have been added:
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,709
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom