Class Employee.Employee

java.lang.Object
Employee.Employee
All Implemented Interfaces:
Cloneable

public class Employee.Employee extends Object implements Cloneable
The Employee.Employee class represents an individual employee and contains the Employee.Employee constructor used to add employees to the employeeData hashMap.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Employee.Employee(String name, String position, int schedule, int section)
    Constructs a new Employee.Employee object with the specified name, position, schedule, and section.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a clone of the employee.
    Returns the first and last name of the employee.
    Returns the position of the employee.
    int
    Returns the schedule of the employee.
    int
    Returns the section of tables that the employee is responsible for.
    void
    Sets the first and last name of the employee.
    void
    setPosition(String position)
    Sets the position of the employee.
    void
    setSchedule(int schedule)
    Sets the schedule of the employee.
    void
    setSection(int section)
    Sets the section of tables that the employee is responsible for.
    Returns a string representation of the employee in the format: "Name: [first and last name] | Position: [position] | Schedule: [schedule] | Section: [section]"

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Employee.Employee

      public Employee.Employee(String name, String position, int schedule, int section)
      Constructs a new Employee.Employee object with the specified name, position, schedule, and section.
      Parameters:
      name - the first and last name of the employee
      position - the position of the employee
      schedule - numerical value representing the schedule of the employee
      section - the section of tables that the employee is responsible for
  • Method Details

    • getName

      public String getName()
      Returns the first and last name of the employee.
      Returns:
      the name of the employee
    • setName

      public void setName(String name)
      Sets the first and last name of the employee.
      Parameters:
      name - the new name of the employee
    • getPosition

      public String getPosition()
      Returns the position of the employee.
      Returns:
      the position of the employee
    • setPosition

      public void setPosition(String position)
      Sets the position of the employee.
      Parameters:
      position - the new position of the employee
    • getSchedule

      public int getSchedule()
      Returns the schedule of the employee.
      Returns:
      the schedule of the employee as a numerical value (1, 2, or 3)
    • setSchedule

      public void setSchedule(int schedule)
      Sets the schedule of the employee.
      Parameters:
      schedule - the new schedule of the employee as a numerical value (1, 2, or 3)
    • getSection

      public int getSection()
      Returns the section of tables that the employee is responsible for.
      Returns:
      the section of tables the employee is responsible for
    • setSection

      public void setSection(int section)
      Sets the section of tables that the employee is responsible for.
      Parameters:
      section - the new section of tables the employee is responsible for
    • toString

      public String toString()
      Returns a string representation of the employee in the format: "Name: [first and last name] | Position: [position] | Schedule: [schedule] | Section: [section]"
      Overrides:
      toString in class Object
      Returns:
      a string representation of the employee
    • clone

      public Object clone()
      Returns a clone of the employee.
      Returns:
      a clone of the employee