Question: Here is my code, I am still confused about this import java.util.Scanner; public class J1_09_3 { public static void main(String[] args) {

Using the class below, produce a test code that calculate the area

Here is my code, I am still confused about this 

import java.util.Scanner;

public class J1_09_3 {
    public static void main(String[] args) {


        Scanner input = new Scanner(System.in);

        Circle circle = new Circle(1);
        circle.getRadius();
        circle.getArea();
        circle.radiusOutput();

    }
}

class Circle {

    private double radius = 0;
    private double circle = 0;

    

    public void getRadius () {


        System.out.println("The area of the circle of radius " + circle.getRadius() + " is " +
                circle.getArea());
    }
    public void radiusOutput() {
        return circle.radius * circle.radius * Math.PI;
    }
}

Using the class below, produce a test code that calculate the area of a circle. 1. Use pow() 2. Include the class in your code. 3. Create a UML diagram for the class at the end of your code. *you don't need a box but a simple dash line would be good. 1 public class Circle { 2 3 private double radius; 10 public Circle(double radius) { } this.radius public Circle() { 11 } 12 13 14 15 16 } this (1.0); radius; public double getArea() { } return this.radius this.radius * Math.PI;

Step by Step Solution

3.50 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Java Program import javautil class Circle public class ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!