Package entity

Class AbstractEmployee

java.lang.Object
entity.AbstractEmployee
All Implemented Interfaces:
Person
Direct Known Subclasses:
Employee

public abstract class AbstractEmployee extends Object implements Person
Abstract base class for employees in the banking system. Implements common fields and behavior.
Author:
TAMIL MUGHILAN
  • Field Details

    • id

      protected int id
    • name

      protected String name
    • email

      protected String email
    • role

      protected String role
    • password

      protected String password
  • Constructor Details

    • AbstractEmployee

      protected AbstractEmployee(int id, String name, String email, String role, String password)
      Constructs an AbstractEmployee.
      Parameters:
      id - employee ID
      name - employee name
      email - employee email
      role - role of the employee
      password - password
  • Method Details

    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String password)
    • getBranchId

      public abstract int getBranchId()
      Gets the branch ID.
      Returns:
      branch ID
    • getId

      public int getId()
      Description copied from interface: Person
      Gets the person's unique ID.
      Specified by:
      getId in interface Person
      Returns:
      the person's ID
    • getName

      public String getName()
      Description copied from interface: Person
      Gets the person's name.
      Specified by:
      getName in interface Person
      Returns:
      the person's name
    • getEmail

      public String getEmail()
      Description copied from interface: Person
      Gets the person's email address.
      Specified by:
      getEmail in interface Person
      Returns:
      the email address
    • getRole

      public String getRole()
    • canApproveTransactions

      public boolean canApproveTransactions()
      Checks if the employee can approve transactions.
      Returns:
      true if manager, false otherwise
    • setId

      public void setId(int id)
    • setName

      public void setName(String name)
    • setEmail

      public void setEmail(String email)
    • setRole

      public void setRole(String role)