payrollsrc - spaces(HRS, RATE, GROSS, TAX, NET);...

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

View Full Document Right Arrow Icon
package payroll; import java.util.*; import*; public class Main { public static void main(String[] args) throws IOException{ Scanner input = new Scanner(new File("payroll.txt")); header(); while(input.hasNext()) { String FN=; String LN=; double HRS= input.nextDouble(); double RATE= input.nextDouble(); payroll(FN, LN, HRS, RATE); } } public static void payroll(String FN, String LN, double HRS, double RATE) { double GROSS=HRS*RATE; double TAX=GROSS%32; double NET=GROSS-TAX; System.out.print(FN + " "); System.out.print(LN);
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: spaces(HRS, RATE, GROSS, TAX, NET); System.out.print(HRS); System.out.print(RATE); System.out.print(GROSS); System.out.print(TAX); System.out.print(NET); System.out.println(); } public static void header() { System.out.println("Name " + "Hours " + "Rate " + "Gross " + "Tax " + "Net"); } public static void spaces(String HRS, String RATE, String GROSS, String TAX, String NET) { String aString = HRS; int length = aString.length(); for(int i=0; i<=length; i++) { System.out.print(" "); } } }...
View Full Document

This homework help was uploaded on 04/07/2008 for the course CSCI 161 taught by Professor Webster during the Spring '08 term at Millersville.

Page1 / 2

payrollsrc - spaces(HRS, RATE, GROSS, TAX, NET);...

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