package PointRun;

import example1.Point;

public class PointRun {

	public static void main(String[] args) {
		Point p1 = new Point(Math.random(), Math.random());
		Point p2 = new Point(Math.random(), Math.random());
		
		System.out.println(p1);
		System.out.println(p2);
		
		double distanceP1FromOrig = Point.getDistanceFromOrig(p1);
		double distanceP2FromOrig = Point.getDistanceFromOrig(p2);
		
		if (distanceP1FromOrig > distanceP2FromOrig) {
			System.out.println("Point 1 is farther from origin.\n" + p1);
		} else {
			System.out.println("Point 2 is farther from origin.\n" + p2);
		}
	}

}
