All pastes #285727 Raw Edit

Stuff

public text v1 · immutable
#285727 ·published 2006-12-20 00:17 UTC
rendered paste body
import java.text.DecimalFormat;

public class Payroll {

    public static void main(String[] args){

    DecimalFormat df = new DecimalFormat( "0.00" );
    Sales sale = new Sales("Adam", 4);
    Volunteer vol = new Volunteer("Chris");
    Hourly hour = new Hourly("Barb", 25, 6.50);

    System.out.println("Payroll for this week:");
    System.out.println("======================");
    System.out.println(vol);

    System.out.println("\tpay = $" + df.format(vol.pay()));
    System.out.println(sale);

    System.out.println("\tpay = $" + df.format(sale.pay()));
    System.out.println(hour);

    System.out.println("\tpay = $" + df.format(hour.pay()));
    System.out.println("======================");
    }
}