Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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. image text in transcribed

> 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions

Question

What is the major difference between a mold and a yeast?

Answered: 1 week ago

Question

=+ Have they changed the way employers view IP?

Answered: 1 week ago