☑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