forked from java-tester-x/JavaExercises4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestMyCircle.java
More file actions
26 lines (18 loc) · 766 Bytes
/
TestMyCircle.java
File metadata and controls
26 lines (18 loc) · 766 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
package src;
public class TestMyCircle {
public static void main(String[] args)
{
MyCircle c1 = new MyCircle(3, 0, 3);
MyCircle c2 = new MyCircle(new MyPoint(1,1), 5);
System.out.println("Circle c1: "+ c1);
System.out.println("Circle c2: "+ c2);
c1.setRadius(5);
System.out.println("Radius of circle c1 now is "+ c1.getRadius());
c2.setCenterXY(3, 3);
System.out.println("Center of circle c2 now is "+ c2.getCenter());
c1.setCenter(new MyPoint(4,4));
System.out.println("Center of circle c1 now is "+ c1.getCenter());
System.out.println("Area of circle c1 is "+ c1.getArea());
System.out.println("Area of circle c2 is "+ c2.getArea());
}
}