Question: The language is Java, only need UML diagram LISTING 11.1 SimpleGeometricObject.java 1 public class SimpleGeometricObject private String color = white. data fields 3 private boolean


The language is Java, only need UML diagram
LISTING 11.1 SimpleGeometricObject.java 1 public class SimpleGeometricObject private String color = "white". data fields 3 private boolean filled; 4 private java.util.Date dateCreated; 6 ** Construct a default geometric object * 7 public SimpleGeometricObjectO 8 9 dateCreated = new Java.util. Date(); date constructed 412 Chapter Inheritance and Polymorphism 10 11 12 /**Construct a geometric object with the specified color and filled value 13 public SimpleGeometricobject(String color, boolean filled) [ 14 15 16 17 18 19/** Return color 20 public String getColorO 21 dateCreated = new Java.util.Date(); this.color -color this.filled filled; return color; 23 24 **Set a new color 25 public void setColor (String color) 26 this.color = color; 28 29/Return filled. Since filled is boolean 30 31 public boolean isFilled) i 32 its getter method is named isFilled/ return filled 35 *Set a new filled* 36 public void setFilled(boolean filled) 37 38 39 40** Get dateCreated 41public java.util.Date getDateCreatedO 42 43 this.filed filled; return dateCreated 45/*Return a string representation of this object */ 46 public Stri 47 48 49 50 ng toStringO return "created on " dateCreated ncolor:"color + "and filled:"+filled
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
