Part 1. Create a new package named HW6. Create an abstract Parent Class named "Watch" based on the UML in the package HW6. Add comments stating where data fields, constructors, toString() and other methods(if any).

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question

Please write the code in Java eclipse.

Part 1. Create a new package named HW6. Create an abstract Parent Class named
"Watch" based on the UML in the package HW6. Add comments stating where data
fields, constructors, toString() and other methods(if any).
Watch
-brand: String
-material: String
-price: double
+Watch()
+Watch(brand: String, material: String, price: double)
+setBrand(brand: String): void
+getBrand(): String
+setMaterial (material: String): void
+get Material(): String
+setPrice(brand: double): void
+getPrice(): double
+is WaterProof(): boolean
+toString():String
Transcribed Image Text:Part 1. Create a new package named HW6. Create an abstract Parent Class named "Watch" based on the UML in the package HW6. Add comments stating where data fields, constructors, toString() and other methods(if any). Watch -brand: String -material: String -price: double +Watch() +Watch(brand: String, material: String, price: double) +setBrand(brand: String): void +getBrand(): String +setMaterial (material: String): void +get Material(): String +setPrice(brand: double): void +getPrice(): double +is WaterProof(): boolean +toString():String
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT