Question
i need help with the following part 2: For this part you will design two classes and an interface; the GeometricObject class, the Square class
i need help with the following
part 2:
For this part you will design two classes and an interface; the GeometricObject class, the Square class and the Colorable interface. GeometricObject has the attributes of color (String), filled (Boolean) and creationDate (String). The Colorable inteface defines one method: howToColor() which returns a String and takes no arguments. The Square class has the attribute side (a double) which is the length of its side. It also has the methods getArea() and getPerimeter() which return doubles. All classes have thier getters and setters. The Square class extends the GeometricObject class and implements the Colorable interface. The implementation of the howToColor() method returns the String color all four sides.
1. Create a UML class diagram that illustrates the design.
2. Implement each class and interface in the UML diagram using your UML diagram as a blueprint: GeometricObject.java, Colorable.java and Square.java
3. Create a test program called Unit06_Prog2.java that creates an instance of the Square class and calls it's howToColor() method, printing out the String on standard out.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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