/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package funwithpoints; import java.util.Scanner; /** * * @author jcmt */ public class PointTest { /** * @param args the command line arguments */ public static void main(String[] args) { // input Scanner input = new Scanner(System.in); //get two inputs Point a = new Point(); Point b = new Point(); //get user input info System.out.println("Please enter x for Point 1: "); a.set_x(input.nextInt()); System.out.println("Please enter y for Point 1: "); a.set_y(input.nextInt()); System.out.println("Please enter x for Point 2: "); b.set_x(input.nextInt()); System.out.println("Please enter y for Point 2: "); b.set_y(input.nextInt()); double distance = a.calculateDistanceFrom(b); System.out.println("The distance between Point 1 and Point 2 is: " + distance); } }