Create a java class Circle as described below: radius: a double PI: a final double initialized with the value 3.14159 The class should have the following methods: calculateArea Returns the area of the circle, which is calculated as: area = PI * radius * radius calculateDiameter Returns the diameter of the circle, which is calculated as: diameter = radius * 2 calculateCircumference Returns the circumference of the circle, which is calculated as: circumference = 2 * PI * radius setRadius A mutator (setter) method for the radius field getRadius An accessor (getter) method for the radius field Create test data and calculate the expected result. Input Expected Results Radius Area Diameter Circumference Write a program name CircleDriver that demonstrates the Circle class by asking the user for the circles radius, creating a Circle object, and then reporting the circles area, diameter, and circumference.
Programming
[Solved] SOLVED:LAB circle and Circle Driver
$25
File Name: SOLVED:LAB_circle_and_Circle_Driver.zip
File Size: 329.7 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.