Lab05e - out.print("Enter Y1 ::...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//© A+ Computer Science - www.apluscompsci.com //Name - //Date - //Lab - import java.util.Scanner; import static java.lang.System.*; import static java.lang.Math.*; public class Lab05e { public static void main( String[] args ) { Scanner keyboard = new Scanner( System.in ); out.print("Enter X1 :: "); int xOne = keyboard.nextInt(); out.print("Enter Y1 :: "); int yOne = keyboard.nextInt(); out.print("Enter X2 :: "); int xTwo = keyboard.nextInt(); out.print("Enter Y2 :: "); int yTwo = keyboard.nextInt(); Distance test = new Distance(); test.setCoordinates(xOne, yOne, xTwo, yTwo); out.println(test.determineClosest()); out.print("Enter X1 :: "); xOne = keyboard.nextInt(); out.print("Enter Y1 :: "); yOne = keyboard.nextInt(); out.print("Enter X2 :: "); xTwo = keyboard.nextInt(); out.print("Enter Y2 :: "); yTwo = keyboard.nextInt(); test.setCoordinates(xOne, yOne, xTwo, yTwo); out.println(test.determineClosest()); out.print("Enter X1 :: "); xOne = keyboard.nextInt();
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: out.print("Enter Y1 :: "); yOne = keyboard.nextInt(); out.print("Enter X2 :: "); xTwo = keyboard.nextInt(); out.print("Enter Y2 :: "); yTwo = keyboard.nextInt(); test.setCoordinates(xOne, yOne, xTwo, yTwo); out.println(test.determineClosest()); out.print("Enter X1 :: "); xOne = keyboard.nextInt(); out.print("Enter Y1 :: "); yOne = keyboard.nextInt(); out.print("Enter X2 :: "); xTwo = keyboard.nextInt(); out.print("Enter Y2 :: "); yTwo = keyboard.nextInt(); test.setCoordinates(xOne, yOne, xTwo, yTwo); out.println(test.determineClosest()); out.print("Enter X1 :: "); xOne = keyboard.nextInt(); out.print("Enter Y1 :: "); yOne = keyboard.nextInt(); out.print("Enter X2 :: "); xTwo = keyboard.nextInt(); out.print("Enter Y2 :: "); yTwo = keyboard.nextInt(); test.setCoordinates(xOne, yOne, xTwo, yTwo); out.println(test.determineClosest()); //add more test cases } }...
View Full Document

This note was uploaded on 11/11/2011 for the course C++ comp122 taught by Professor N/a during the Spring '07 term at Cy-Fair College.

Page1 / 2

Lab05e - out.print("Enter Y1 ::...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online