Question: public class Employee { / * * * * * * * * * * * * * * * * * * * *
public class Employee
Attributes
String Fname;
String Lname;
float rate f;
float taxrate f;
int hours ;
float gross f;
float tax f;
float net f;
float netpercent f;
public String getFname
return Fname;
public void setFnameString fname
Fname fname;
public String getLname
return Lname;
public void setLnameString lname
Lname lname;
public float getRate
return rate;
public void setRatefloat rate
this.rate rate;
public float getTaxrate
return taxrate;
public void setTaxratefloat taxrate
this.taxrate taxrate;
public int getHours
return hours;
public void setHoursint hours
this.hours hours;
public float getGross
return gross;
public void setGrossfloat gross
this.gross gross;
public float getTax
return tax;
public void setTaxfloat tax
this.tax tax;
public float getNet
return net;
public void setNetfloat net
this.net net;
public float getNetpercent
return netpercent;
public void setNetpercentfloat netpercent
this.netpercent netpercent;
End Attributes
Constructors
public EmployeeString firstName, String lastName, int hoursWorked, float payRate
Fname firstName;
Lname lastName;
hours hoursWorked;
rate payRate;
Methods
public void menu
computeGross;
computeTax;
computeNet;
computeNetperc;
displayEmployee;
public void computeGross
if hours
gross hours rate;
else
gross ratehours rate f;
protected void computeTax
tax gross taxrate;
protected void computeNet
net gross tax;
protected void computeNetperc
netpercent net gross;
protected void displayEmployee
System.out.printlnEmployee Name: getFname getLname;
System.out.printlnGross Pay: getGross;
System.out.printlnTax: getTax;
System.out.printlnNet Pay: getNet;
System.out.printlnNet Percent: getNetpercent;
Am I doing this right?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
