Question: In python ::: 1 - Define the Circle 2 D class that contains: Two double data fields named x ? and y that specify the
In python ::: Define the CircleD class that contains:
Two double data fields named and that specify the center of the circle with methods.
A data field radius with a get method. points
A constructor that creates a circle with the specified and radius. points
A method getArea that returns the area of the circle. points
A method getPerimeter that returns the perimeter of the circle. points
A method contains that returns true if the specified point is inside this circle. See Figure a points
A method containscircle that returns true if the specified circle is inside this circle. See Figure b points
A method overlaps circle that returns true if the specified circle overlaps with this circle. See Figure c below. points
Implement the class.
Write a test program
TestCircleDpy that creates a CircleD object:
new CircleD points
displays its area and perimeter points
displays the result of contains points
displays the result of ccontainsCircleD points
displays the result of coverlapsCircleD points
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
