CS110 Circle
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
CS110 Circle
Requirement
In this Assignment, you should write a class that, given a circle’s radius, has methods that return the circle’s area, diameter, and circumference.
In case you have forgotten, the equations for a circle’s area, diameter, and circumference is given below.
1 area = πrr
2 diameter = 2r
3 circumference = 2πr
Based on Chapter 3, Programming Challenge # 8 Circle class in your textbook. Your output is given below.
1 Enter the radius of a circle: 5.3
2 The circle's area is 88.2472631
3 The circle's diameter is 10.6
4 The circle's circumference is 33.300854
Write a separate class called CircleDemo with a main method that asks the user for the circle’s radius, creates a Circle object, and then reports the circle’s area, diameter, and circumference using the circle’s getter methods.
2025-12-27