Question: efine the Circle Class ( 2 marks ) Define a class named Circle. The class should have one private attribute: radius ( default to 1
efine the Circle Class marks Define a class named Circle. The class should have one private attribute: radius default to Include the following methods:init self radius: float Constructor to initialize the ra dius.get radiusself float Returns the radius.set radiusself radius: float Sets a new radius shouldvalidate that the radius is positivecalculate areaself float Returns the area of the circletimes radiuscalculate circumferenceself float Returns the circumference of the circle times times radius
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
