View difference between Paste ID: 23hhzrKQ and rMTHnWkG
SHOW: | | - or go back to the newest paste.
1
2
public class ShapeTester {
3
4
	/**
5
	 * @param args
6
	 */
7
	public static void main(String[] args) {
8
		// TODO Auto-generated method stub
9
		
10
		Shape[] shapes = new Shape[8];
11
		Point [] points = new Point[4];
12
				
13
		Point p1 = new Point(0,4);
14
		Point p2 = new Point(3,4);
15
		Point p3 = new Point(3,0);
16
		Point p4 = new Point();
17
		
18
		points[0] = p1;
19
		points[1] = p2;
20
		points[2] = p3;
21
		points[3] = p4;
22
		
23
		/*
24
		for(Point p : points) {
25
			System.out.println(p);
26
		}
27
		*/
28
		
29
		//Rectangle r1 = new Rectangle(p1, p2, p3, p4);
30
		Shape r1 = new Rectangle(p1, p2, p3, p4);
31
		
32
		System.out.println("Distance between p1 & p2: " + r1.distanceFormula(p2,  p3));
33
		System.out.println(r1);
34
		System.out.println();
35
		
36
		Circle c1 = new Circle(3, 4, 5);
37
		System.out.println(c1);
38
39
40
	}
41
42
}