Question: Design a class which represents a Circle in the ( x , y ) coordinate plane. A Circle object is initialized with three input arguments.

Design a class which represents a Circle in the (x,y) coordinate plane. A Circle object is initialized with
three input arguments. The center of the circle specified as the first two inputs (x,y) and the radius of
the circle. By default, the circle will be centered at (0,0) with a radius of 1(that would be implemented
in the constructor). The constructor should be consistent with the following logic:
c = Circle(0,0,1) # circle centered at (0,0) with r=1
c = Circle(1) # circle centered at (1,0) with r=1
c = Circle(1,1) # circle centered at (1,1) with r=1
c = Circle() # circle centered at (0,0) with r=1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!