-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathTestBall.java
More file actions
33 lines (24 loc) · 748 Bytes
/
TestBall.java
File metadata and controls
33 lines (24 loc) · 748 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
28
29
30
31
32
33
package src;
public class TestBall {
public static void main(String[] args) {
Ball b = new Ball(50, 50, 30, 10, 45);
System.out.println("The X coordinate of ball is: "+b.getX());
System.out.println("The Y coordinate of ball is: "+b.getY());
System.out.println("The Radius of ball is: "+b.getRadius());
System.out.println(b);
b.setX(100);
b.setY(100);
b.setRadius(20);
System.out.println(b);
b.setXY(200, 200);
System.out.println(b);
b.move();
System.out.println(b);
b.reflectHorizontal();
b.move();
System.out.println(b);
b.reflectVertical();
b.move();
System.out.println(b);
}
}