6. Make a class called MyCircle, which models a circle.The class contains: • One private instance variables: radius (int). • A constructor that constructs a circle with the given radius. • Write...


6. Make a class called MyCircle, which models a circle.The class contains:


• One private instance variables: radius (int).


• A constructor that constructs a circle with the given radius.


• Write getter to get radius of the circle.


• Write setter to set the radius of the circle.


• A getArea() method that returns the area of the circle in float.


• A getCircumference() method that returns the circumference of the circle.


• Area of Circle = pr2


Circumference of Circle= 2pr


Create main class that construct two circles, assign radius to both circles and display their respective area and circumference.



Programming language : Java



Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here