{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Program #6 - /Matt Hergenrether/Section 10/programming...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 //Matt Hergenrether //Section 10 //programming assignment # 6 import java.util.* public class Averages { public final static boolean DEBUG = true public final static int numHighest = 2 public final static int numTotal = 3 public final static int maxScore = 100 public final static int minScore = 0 public static void main(String[] args) { Scanner scan = new Scanner(System.in) final String SENT = "QUIT" // Declare needed Variables String firstName String lastName int testOne int testTwo int testThree double averageTwo double averageThree // Start Sentinel loop while(scan.hasNext()) { firstName = scan.next() if(DEBUG) { System.out.println("DEBUG") System.out.println(" First Name entered: " + firstName) System.out.println() } if(firstName.equals(SENT)) { System.exit(0) } lastName = scan.next() if(DEBUG) {
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
Sheet1 Page 2 System.out.println("DEBUG") System.out.println(" Last Name entered: " + lastName) System.out.println() } testOne = scan.nextInt() if(DEBUG) { System.out.println("DEBUG") System.out.println(" Number entered: " + testOne) System.out.println() } if(testOne < 0 || testOne > 100) { System.out.println("Not a Valid Integer: Exiting Program")
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}