Question: Write this code using Java 2. This problem contains several steps: Design an interface named Colorable with a public void method named howToColor(). Every class

Write this code using Java
2. This problem contains several steps: Design an interface named Colorable with a public void method named howToColor(). Every class of a colorable object must implement this interface. a. Design a new class named Square that extends Geometricobject (available from http://www.cs.armstrong.edu/liang/intro10e/html/GeometricObject.html) and implements the Colorable interface. Define the howTocolor) method for a Square so that it prints a brief message on how to color the square (for now, this message can be anything you want, even something silly like "Use a blue crayon"). b. Implement a class named Triangle that extends Geometricobject (but does NOT implement the Colorable interface). To speed things up, just provide stubs ("placeholder" methods used for testing purposes) for the two methods that every Geometricobject subclass must implement getArea() and getPerimeter(). For now, each of these methods should always return 1.0. c. Stony Brook University
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
