PayrollProgram3 - /* * To change this template, choose...

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

View Full Document Right Arrow Icon
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author JANAYA */ import java.util.Scanner; public class PayrollProgram3 { String name; Float rate; Float hours; /** * @param args the command line arguments */ public static void main(String[] args) { // System.out.println( "Welcome to the Payroll Program Part3! " ); boolean quit = false; // This flag will control whether we exit the loop below // Loop until user types "quit" as the employee name: while (!quit) { // create scanner to obtain input from command window Scanner input = new Scanner ( System.in ); System.out.println(); // outputs a blank line System.out.print( "Please enter the employee name or quit: " ); // prompt for and input employee name String nameOfEmployee = input.nextLine(); // read what user has inputted if ( nameOfEmployee.equals("quit")) // Check whether user indicated to quit program { System.out.println( "Program has ended" ); quit = true; } else { // User did not indicate to stop, so continue reading info for this
Background image of page 1

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

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

This note was uploaded on 08/14/2011 for the course IT 215 taught by Professor Danielreddy during the Spring '11 term at University of Phoenix.

Page1 / 2

PayrollProgram3 - /* * To change this template, choose...

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