Answered step by step
Verified Expert Solution
Question
1 Approved Answer
code the following java class Ellipse - minor Radius : double get/set>> + Ellipse() + Ellipse(Point, double, double) + focalDistance(): double + eccentricity(): double The
code the following java class
Ellipse - minor Radius : double get/set>> + Ellipse() + Ellipse(Point, double, double) + focalDistance(): double + eccentricity(): double The default constructor should delegate the default Circle constructor, and set the minor Radius equal to the radius this creates the a unit circle. The second constructor takes the center Point, radius, and minorRadius; and uses them to set the parameters of the ellipse. Override width() and height() to the major and minor diameters of the ellipse, respec- tively. Override diameter() to return the maximum of the ellipse's width and height. Override area(), perimeter(), and inBounds) according to the following rules: - A = 1.11.12 - Pav21/+rz - If the center point of the ellipse is (h,k), then the point (x,y) is inside the ellipse when: (x - h)2 (y - k) rr Override getBoundingBox() to create a Rectangle surrounding the ellipse. The radius will tell you where the x coordinates belong with respect to the center, and the minorRadius will tell you where to put the y coordinates. The ellipse has two focal points along its longest axis. The distance between its center and each focal point is: f = V1 - Implement the method focalDistance() to return this value. The eccentricity of an ellipse is defined as: max(r1,12) Implement the method eccentricity) to return this value. Ellipse - minor Radius : double get/set>> + Ellipse() + Ellipse(Point, double, double) + focalDistance(): double + eccentricity(): double The default constructor should delegate the default Circle constructor, and set the minor Radius equal to the radius this creates the a unit circle. The second constructor takes the center Point, radius, and minorRadius; and uses them to set the parameters of the ellipse. Override width() and height() to the major and minor diameters of the ellipse, respec- tively. Override diameter() to return the maximum of the ellipse's width and height. Override area(), perimeter(), and inBounds) according to the following rules: - A = 1.11.12 - Pav21/+rz - If the center point of the ellipse is (h,k), then the point (x,y) is inside the ellipse when: (x - h)2 (y - k) rr Override getBoundingBox() to create a Rectangle surrounding the ellipse. The radius will tell you where the x coordinates belong with respect to the center, and the minorRadius will tell you where to put the y coordinates. The ellipse has two focal points along its longest axis. The distance between its center and each focal point is: f = V1 - Implement the method focalDistance() to return this value. The eccentricity of an ellipse is defined as: max(r1,12) Implement the method eccentricity) to return this valueStep 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