{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lab03a - System.out.print"Enter side...

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 java.lang.Math.*; public class Lab03a //this class is used to test Triangle { public static void main( String[] args ) { Scanner keyboard = new Scanner(System.in); //ask for user input System.out.print("Enter side A :: "); int a = keyboard.nextInt(); System.out.print("Enter side B :: "); int b = keyboard.nextInt(); System.out.print("Enter side C :: "); int c = keyboard.nextInt(); Triangle test = new Triangle(a, b, c); test.calcPerimeter(); test.calcArea(); test.print(); //ask for user input
Background image of page 1

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

View Full Document Right 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 side A :: "); a = keyboard.nextInt(); System.out.print("Enter side B :: "); b = keyboard.nextInt(); System.out.print("Enter side C :: "); c = keyboard.nextInt(); test.setSides(a,b,c); test.calcPerimeter(); test.calcArea(); test.print(); System.out.print("Enter side A :: "); a = keyboard.nextInt(); System.out.print("Enter side B :: "); b = keyboard.nextInt(); System.out.print("Enter side C :: "); c = keyboard.nextInt(); test.setSides(a,b,c); test.calcPerimeter(); test.calcArea(); test.print(); //add one more input section } }...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

Lab03a - System.out.print"Enter side...

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

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