Lab03d - System.out.print("Enter Y1 :: "); 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 Lab03d { public static void main( String[] args ) { Scanner keyboard = new Scanner(System.in); System.out.print("Enter X1 :: "); int x1 = keyboard.nextInt(); System.out.print("Enter Y1 :: "); int y1 = keyboard.nextInt(); System.out.print("Enter X2 :: "); int x2 = keyboard.nextInt(); System.out.print("Enter Y2 :: "); int y2 = keyboard.nextInt(); Distance test = new Distance(x1,y1, x2, y2); test.calcDistance(); test.print(); System.out.print(""); System.out.print("Enter X1 :: "); x1 = 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: System.out.print("Enter Y1 :: "); y1 = keyboard.nextInt(); System.out.print("Enter X2 :: "); x2 = keyboard.nextInt(); System.out.print("Enter Y2 :: "); y2 = keyboard.nextInt(); test.setCoordinates(x1, y1, x2, y2); test.calcDistance(); test.print(); System.out.print(""); System.out.print("Enter X1 :: "); x1 = keyboard.nextInt(); System.out.print("Enter Y1 :: "); y1 = keyboard.nextInt(); System.out.print("Enter X2 :: "); x2 = keyboard.nextInt(); System.out.print("Enter Y2 :: "); y2 = keyboard.nextInt(); test.setCoordinates(x1, y1, x2, y2); test.calcDistance(); test.print(); System.out.print(""); } }...
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

Lab03d - System.out.print("Enter Y1 :: "); 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