Package entity
Class AbstractEmployee
java.lang.Object
entity.AbstractEmployee
- All Implemented Interfaces:
Person
- Direct Known Subclasses:
Employee
Abstract base class for employees in the banking system.
Implements common fields and behavior.
- Author:
- TAMIL MUGHILAN
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractEmployee
(int id, String name, String email, String role, String password) Constructs an AbstractEmployee. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the employee can approve transactions.abstract int
Gets the branch ID.getEmail()
Gets the person's email address.int
getId()
Gets the person's unique ID.getName()
Gets the person's name.getRole()
void
void
setId
(int id) void
void
setPassword
(String password) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface entity.Person
isValidEmail, isValidName
-
Field Details
-
id
protected int id -
name
-
email
-
role
-
password
-
-
Constructor Details
-
AbstractEmployee
Constructs an AbstractEmployee.- Parameters:
id
- employee IDname
- employee nameemail
- employee emailrole
- role of the employeepassword
- password
-
-
Method Details
-
getPassword
-
setPassword
-
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. -
getName
Description copied from interface:Person
Gets the person's name. -
getEmail
Description copied from interface:Person
Gets the person's email address. -
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
-
setEmail
-
setRole
-