-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestCircle.java
More file actions
27 lines (18 loc) · 911 Bytes
/
TestCircle.java
File metadata and controls
27 lines (18 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.mycompany.box;
public class TestCircle {
public static void main(String[] args) {
Circle c1 = new Circle(2.0,"blue");
System.out.println("The radius is: " +c1.getRadius() );
System.out.println("The color is: "+ c1.getColor());
System.out.println("The area is: " +c1.getArea());
// System.out.println("The area is: %.2f", c1.getArea());
Circle c2 = new Circle(3.0);
System.out.println("The radius is: " +c2.getRadius() );
System.out.println("The color is: "+ c2.getColor());
System.out.println("The area is: " +c2.getArea());
Circle c3 = new Circle();
System.out.println("The radius is: " +c3.getRadius() );
System.out.println("The color is: "+ c3.getColor());
System.out.println("The area is: " +c3.getArea());
}
}