Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please I want java source files and screenshot of outputs. send me picture of the computer screen where you run the code and please do
please I want java source files and screenshot of outputs. send me picture of the computer screen where you run the code and please do not crop anything
*13.7 (The Colorable interface) Design an interface named Colorable with a void method named howToColor (). Every class of a colorable object must implement the Colorable interface. Design a class named Square that extends GeometricObject and implements Colorab1e. Implement howToColor to display the message Color a11 four sides. The Square class contains a data field side with getter and setter methods, and a constructor for constructing a Square with a specified side. The Square class has a private double data field named side with its getter and setter methods. It has a no-arg constructor to create a Square with side 0 , and another constructor that creates a Square with the specified side. Draw a UML diagram that involves Colorab 1e, Square, and Geometricobject. Write a test program that creates an array of five Geometric0bjects. For each object in the array, display its area and invoke its howToColor method if it is colorable. * 13.11 (The Octagon class) Write a class named Octagon that extends Geometricobject and implements the Comparable and Cloneable interfaces. Assume all eight sides of the octagon are of equal length. The area can be computed using the following formula: area=(2+4/2)sideside The Octagon class has a private double data field named side with its getter and setter methods. The class has a no-arg constructor that creates an 0ctagon with side 0 , and a constructor to create an Octagon with a specified side. Draw the UML diagram that involves 0ctagon, GeometricObj ect, Comparable, and Cloneab 1 e. Write a test program that creates an 0ctagon object with side value 5 and displays its area and perimeter. Create a new object using the c1one method, and compare the two objects using the compareTo method. * I4.I (Display images) Write a program that displays four images in a grid pane, as shown in Figure 14.43a. (a) FIGURE I4.43 (a) Exercise 14.1 displays four imagesStep 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