|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlibrarytest.Person
librarytest.Employee
public class Employee
Employee – inherits from class Person and has an EmployeeID - Identification number (a value between 1 and 999), a Type of employee (enum salary/hourly/contract), a Pay rate (monthly salary or hourly rate), an Area of specialization (use enum), a flag of Currently working? (Clocked in) (boolean), and the Hours worked in current month (double) - allow quarter hours
Constructor Summary | |
---|---|
Employee()
Default constructor |
|
Employee(int employeeID,
EmployeePayType employeePay,
double employeePayAmt,
Specialization employeeSpeciality,
boolean clockedIn,
double hoursWorkedInMo,
java.lang.String firstName,
java.lang.String lastName,
Address addressPerson,
Gender genderPerson)
Constructor with all data given |
Method Summary | |
---|---|
double |
getCurrentPayInMo()
|
int |
getEmployeeID()
|
EmployeePayType |
getEmployeePay()
|
double |
getEmployeePayAmt()
|
Specialization |
getEmployeeSpeciality()
|
double |
getHoursWorkedInMo()
|
boolean |
isClockedIn()
Indicates if employee is currently working or not |
void |
setClockedIn(boolean clockedIn)
Sets if employee is currently working or not |
void |
setCurrentPayInMo()
Calculate the current pay based on job type and hours |
boolean |
setEmployeeID(int employeeID)
Error check the employeeID value |
void |
setEmployeePay(EmployeePayType employeePay)
|
boolean |
setEmployeePayAmt(double employeePayAmt)
|
void |
setEmployeeSpeciality(Specialization employeeSpeciality)
|
boolean |
setHoursWorkedInMo(double hoursWorkedInMo)
Error check number of hours worked |
java.lang.String |
toString()
Displays data of Person private String firstName; private String lastName; private Address addressPerson; private Gender genderPerson; plus Employee info private int employeeID; private EmployeePayType employeePay; private double employeePayAmt; private Specialization employeeSpeciality; private boolean clockedIn; private double hoursWorkedInMo; private double currentPayInMo; |
Methods inherited from class librarytest.Person |
---|
getAddressPerson, getFirstName, getGenderPerson, getLastName, setAddressPerson, setFirstName, setGenderPerson, setLastName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Employee()
public Employee(int employeeID, EmployeePayType employeePay, double employeePayAmt, Specialization employeeSpeciality, boolean clockedIn, double hoursWorkedInMo, java.lang.String firstName, java.lang.String lastName, Address addressPerson, Gender genderPerson)
employeeID
- employeePay
- employeePayAmt
- employeeSpeciality
- clockedIn
- hoursWorkedInMo
- firstName
- lastName
- addressPerson
- genderPerson
- Method Detail |
---|
public double getCurrentPayInMo()
public void setCurrentPayInMo()
public int getEmployeeID()
public boolean setEmployeeID(int employeeID)
employeeID
-
public EmployeePayType getEmployeePay()
public void setEmployeePay(EmployeePayType employeePay)
employeePay
- enum value of HOURLY, SALARY, or CONTRACTpublic double getEmployeePayAmt()
public boolean setEmployeePayAmt(double employeePayAmt)
employeePayAmt
-
public Specialization getEmployeeSpeciality()
public void setEmployeeSpeciality(Specialization employeeSpeciality)
employeeSpeciality
- public boolean isClockedIn()
public void setClockedIn(boolean clockedIn)
clockedIn
- public double getHoursWorkedInMo()
public boolean setHoursWorkedInMo(double hoursWorkedInMo)
hoursWorkedInMo
-
public java.lang.String toString()
toString
in class Person
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |