Question: Instructions Class name: ellipse.java Description: Implement the class ellipse.java, which inherits from GeometricObject given in class. The ellipse class should have: double a, b properties
| Instructions | |
| Class name: ellipse.java Description: Implement the class ellipse.java, which inherits from GeometricObject given in class. The ellipse class should have: double a, b properties Constructor receiving a and b values as parameters and setting them. Implementation of methods: getters and setters for a and b getArea, getPerimeter and toString Your submission should include ALL classes, not just the ellipse class. Those classes are: GeometricObject, Circle, Rectangle, Ellipse, GeometricObject tester. A sample run is shown. Please make sure your program prints similar results. | |
> run TestGeometricObject The circle was created on Thu Mar 02 17:59:16 EST 2017 The color is Blue Is filled? true The area is 78.540 The perimeter 31.416 The radius is 5.0 The diameter is 10.0 The rectangle was created on Thu Mar 02 17:59: 16 EST 2017 The color is Lime Is filled? true The area is 35.000 The perimeter 24.000 The ellipse was created on Thu Mar 02 17: 59 16 EST 2017 The color is Golcd Is filled? false The area is 37. 699 The perimeter 22.103 a is 3.0 b is 4.0 Equal area for circle and rectangle? false Equal area for circle and ellipse? false Equal area for rectangle and ellipse? false
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts

