All pastes #453444 Raw Edit

Mine

public java v1 · immutable
·published 2007-04-23 00:30 UTC
rendered paste body
//This is the program accessing payroll.import java.util.Scanner;public class ch6_5{	public static void main(String[] args)	{			String name;		int id;		double rate, hours;				Scanner input = new Scanner(System.in);				System.out.print("Enter an employee name:");		name = input.nextLine();		System.out.print("Enter the employee's id number:");		id = input.nextInt();				Payroll e = new Payroll(name, id);				System.out.print("Enter the employee's pay rate:");		rate = input.nextDouble();		e.setRate(rate);		System.out.print("Enter the number of hours worked:");		hours = input.nextDouble();		e.setHours(hours);			      	System.out.println("The total gross pay is: " + e.getGross());	}}//This is the payroll class.public class Payroll{   private String name;   private int idNumber;   private double payRate;   private double hoursWorked;//This is my constructor   public Payroll(String empName, int idNum)   {      name = empName;      idNumber = idNum;   }//These are my mutator methods   public void setName(String empName)   {		name = empName;   }   public void setId(int idNum)   {		idNumber = idNum;   }      public void setRate(double rate)   {		payRate = rate;   }   public void setHours(double hours)   {		hoursWorked = hours;   }//This is my accessor method   public double getGross()   {   		double gross;		gross = payRate * hoursWorked;		return gross;   }}