Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write the code for the following UML diagram using Inheritance GeometricObject -color: String -filled: boolean -dateCreated: java.util.Date +GeometricObject() +Geometricobject (color: String. filled: boolean) +get
Write the code for the following UML diagram using Inheritance GeometricObject -color: String -filled: boolean -dateCreated: java.util.Date +GeometricObject() +Geometricobject (color: String. filled: boolean) +get Color(): String +setColor (color: String): void +isFilled(): boolean +setFilled (filled: boolean): void *getDateCreated (): java.util.Date +toString(): String Circle -radius: double +Circle() +Circle(radius: double) +Circle(radius: double, color: String. filled: boolean) +get Radius (): double +set Radius(radius: double): void +get Area(): double. +getPerimeter(): double +get Diameter (): double +print Circle(): void The color of the object (default: white). Indicates whether the object is filled with a color (default: false). The date when the object was created. Creates a Geometricobject. Creates a GeometricObject with the specified color and filled values. Returns the color. Sets a new color. Returns the filled property. Sets a new filled property. Returns the dateCreated. Returns a string representation of this object. width: double -height: double Rectangle +Rectangle() +Rectangle (width: double, height: double) +Rectangle (width: double, height: double color: String, filled: boolean) +getWidth(): double +setWidth (width: double): void +getHeight(): double. +setHeight (height: double): void +getArea(): double. +getPerimeter (): double FIGURE 11.1 The GeometricObject class is the superclass for Circle and Rectangle.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Heres a Java code that represents the given UML diagram using inheritance java import javautilDate c...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started