PRO192_-_PE01_-_SP_2025_3490.webp
BichPhuong97

PRO192_-_PE01_-_SP_2025_3490.webp

☑Kizspy.me
+Watch()
+Watch(id: int, brand: String, model :
String, price: double)
+setters & getters
+ toString():String
which sets values to id, brand, model and
price
• setters & getters: Write the setters and
getters all of the fields
⚫ toString(): String - return a string format that
contains all the information of the watch:
id, brand, model, price. The price is
formatted to two decimal places
Write a class WatchList which extends from ArrayList (ArrayList is a collection) with the following
information:
WatchList
+addWatch(watch: Watch):void
+ filterByBrand(value: String): WatchList
+findMost Expensive(): Watch
Where:

addWatch(watch: Watch):void add a
new watch to the Watch List collection
⚫ filterByBrand(value: String): WatchList -
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
Zoom
+ 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,799
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom