Fill This Form To Receive Instant Help
Homework answers / question archive / What is the correct code for this Question?please write a class to represent a Circle called BasicCircle
What is the correct code for this Question?please write a class to represent a Circle called BasicCircle. This should include the following: A single attribute named radius. A default constructor which will set the value of radius to 1. A general constructor which should set the radius to a value which is passed to the constructor. Getter and setter methods for the radius attribute. A method called getCircumference to calculate and return the circumference of the BasicCircle to 2 decimal places (see apendix). You should use Math.PI in this method. A method called getArea to calculate and return the area of the BasicCircle to 2 decimal places (see apendix). You should use Math.PI in this method.