Question: 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:

 

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

1 Expert Approved Answer
Step: 1 Unlock

Heres a Java code that represents the given UML diagram using inheritance java import javautilDate c... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Operating System Questions!