librarytest
Class Employee

java.lang.Object
  extended by librarytest.Person
      extended by librarytest.Employee

public class Employee
extends Person

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

Employee

public Employee()
Default constructor


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)
Constructor with all data given

Parameters:
employeeID -
employeePay -
employeePayAmt -
employeeSpeciality -
clockedIn -
hoursWorkedInMo -
firstName -
lastName -
addressPerson -
genderPerson -
Method Detail

getCurrentPayInMo

public double getCurrentPayInMo()
Returns:
double - pay due for current month

setCurrentPayInMo

public void setCurrentPayInMo()
Calculate the current pay based on job type and hours


getEmployeeID

public int getEmployeeID()
Returns:
employeeID number

setEmployeeID

public boolean setEmployeeID(int employeeID)
Error check the employeeID value

Parameters:
employeeID -
Returns:
boolean true if ID is valid (between 1 and 999)

getEmployeePay

public EmployeePayType getEmployeePay()
Returns:
enum value of HOURLY, SALARY, or CONTRACT

setEmployeePay

public void setEmployeePay(EmployeePayType employeePay)
Parameters:
employeePay - enum value of HOURLY, SALARY, or CONTRACT

getEmployeePayAmt

public double getEmployeePayAmt()
Returns:
double - pay rate for current month

setEmployeePayAmt

public boolean setEmployeePayAmt(double employeePayAmt)
Parameters:
employeePayAmt -
Returns:
boolean true if pay value is valid (> 0)

getEmployeeSpeciality

public Specialization getEmployeeSpeciality()
Returns:
enum of specialization

setEmployeeSpeciality

public void setEmployeeSpeciality(Specialization employeeSpeciality)
Parameters:
employeeSpeciality -

isClockedIn

public boolean isClockedIn()
Indicates if employee is currently working or not

Returns:
boolean - true is currently clocked in

setClockedIn

public void setClockedIn(boolean clockedIn)
Sets if employee is currently working or not

Parameters:
clockedIn -

getHoursWorkedInMo

public double getHoursWorkedInMo()
Returns:
double - hours worked in the current month

setHoursWorkedInMo

public boolean setHoursWorkedInMo(double hoursWorkedInMo)
Error check number of hours worked

Parameters:
hoursWorkedInMo -
Returns:
boolean - valid number of hours entered

toString

public 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;

Overrides:
toString in class Person
Returns: