Question Create a Circle class that computes the area and circumference of a circle. The class has 2 methods both of which return double. The calculateArea() method calculates the area of a circle given the radius (Area = ͖Pi * radius * radius) and returns the area of the circle. (Pi = 3.14159) The calculateCircumference() method calculates the circumference of the circle given the radius of the circle (Circumference = Pi * radius * 2) Prompts the user to enter the radius of the circle and displays the area and the circumference of the circle in the console

VZUSJ7 The Asker · Computer Science

Create a Circle class that computes the area and circumference of a circle.

The class has 2 methods both of which return double.
The calculateArea() method calculates the area of a circle given the radius (Area = ͖Pi * radius * radius) and returns the area of the circle. (Pi = 3.14159)
The calculateCircumference() method calculates the circumference of the circle given the radius of the circle (Circumference = Pi * radius * 2)
Prompts the user to enter the radius of the circle and displays the area and the circumference of the circle in the console

More
Community Answer
PWWZMH

CODE : import java.util.Scanner; class Circle {     //Math.PI = 3.141592653589793     //method to calculate area of circle     public static double calculateArea(double radius) {         return Math.PI*radius*radius;     }     //method to calculate perimeter of circle     public static double calculateCircumference(double radius) {         return 2*Math.PI*radius;     }      } public class Main {     public static void main(String[] args) {         Circle c = new Circle();         Scanner scan = new Scanner(System.in); ... See the full answer