Question: How to write a class named Oct that extends GeometricObject and implements the java.lang. Comparable interfaces, and overrides Object.toString() :String. Assume that all eight sides
How to write a class named Oct that extends GeometricObject and implements the java.lang. Comparable interfaces, and overrides Object.toString() :String. Assume that all eight sides of the octagon are of equal length. The area A of a regular octagon of side length a is given by A = 2*cot(pi/8)*a2. When implementing the toString() include the side value and area as part of the return value. When implementing Comparable use the value of the area in the comparison process.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
