|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object employee.Employee
public class Employee
Constructor Summary | |
---|---|
Employee()
Creates a new default instance of Employee |
|
Employee(java.lang.String last,
java.lang.String first)
creates a new instance of Employee, given last and first name |
|
Employee(java.lang.String last,
java.lang.String first,
double pay)
creates a new instance of Employee, given last and first name and current pay rate. |
|
Employee(java.lang.String last,
java.lang.String first,
double pay,
int idLen)
creates a new instance of Employee, given last and first name and current pay rate and length of the employee ID. |
Method Summary | |
---|---|
boolean |
addWeek(double hrs)
add a weeks worth of data, given the number of hours worked. |
boolean |
addWeek(int weekNo,
double hrs)
add a weeks worth of data, given the week number and number of hours worked. |
boolean |
addWeek(Week wk)
add a weeks worth of data, given the actual Week object to add. |
double |
getAveHours()
report ave (mean) hours worked per week. |
double |
getAvePay()
report ave (mean) total pay per week. |
double |
getAvePerHour()
report ave per hour pay. |
double |
getCurrPayRate()
report current pay rate |
java.lang.String |
getEmployeeID()
report employee ID - to user of Employee class, this is a String |
java.lang.String |
getFirstName()
report employee first name |
java.lang.String |
getLastName()
report employee last name |
java.lang.String |
getLastNameFirst()
report name, last name first |
java.lang.String |
getLastWeekString()
report string representation for last week added. |
Week |
getNthWeek(int n)
report work info for Nth week presuming that there are that many weeks. |
double |
getNthWeekHoursWorked(int n)
report total hours worked for Nth week presuming that there are that many weeks. |
java.lang.String |
getNthWeekString(int n)
report string representation for Nth week presuming that there are that many weeks. |
double |
getNthWeekTotalPay(int n)
report total pay for Nth week presuming that there are that many weeks. |
int |
getNumWeeks()
report number of weeks of work info |
double |
getTotalHoursWorked()
report total hours worked for the employee across all weeks combined |
double |
getTotalPay()
report total pay for the employee across all weeks combined |
java.lang.String |
getWholeName()
report whole name |
boolean |
giveRaise(double raise)
Give a pay raise. |
void |
setFirstName(java.lang.String first)
set first name to a sepcific value. |
void |
setLastName(java.lang.String last)
set last name to a specific value. |
java.lang.String |
toString()
produce a friendly string version of the object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Employee()
public Employee(java.lang.String last, java.lang.String first)
public Employee(java.lang.String last, java.lang.String first, double pay)
public Employee(java.lang.String last, java.lang.String first, double pay, int idLen)
Method Detail |
---|
public java.lang.String getEmployeeID()
public java.lang.String getLastName()
public java.lang.String getFirstName()
public double getCurrPayRate()
public java.lang.String getWholeName()
public java.lang.String getLastNameFirst()
public int getNumWeeks()
public Week getNthWeek(int n)
public java.lang.String getNthWeekString(int n)
public double getNthWeekTotalPay(int n)
public double getNthWeekHoursWorked(int n)
public double getTotalPay()
public double getTotalHoursWorked()
public double getAvePay()
public double getAveHours()
public double getAvePerHour()
public java.lang.String getLastWeekString()
public void setLastName(java.lang.String last)
public void setFirstName(java.lang.String first)
public boolean giveRaise(double raise)
public boolean addWeek(Week wk)
public boolean addWeek(double hrs)
public boolean addWeek(int weekNo, double hrs)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |