Question
SECTION B: Program (80 marks) This section consists of ONE question. Develop a leave management program using Object Oriented Concept and Java Programming language. The
SECTION B: Program (80 marks)
This section consists of ONE question.
Develop a leave management program using Object Oriented Concept and Java Programming language.
The program is to facilitate various leave managing related processes in a corporation. It can be used by the staff of the corporation. The main functionalities of the program are described as below:
Employee registration with user account and role configuration. This module can be accessed by the system administrators (user role: ADMIN) only.
Leave type setup and configuration module. This module can be accessed by the system administrators (user role: ADMIN).
Leave application module. This module can be accessed by the system users
(user role: USER).
Leave approval module. This module can be accessed by the system users
(user role: USER).
Reports generating module. This module can be accessed by the system administrators (user role: ADMIN).
The program is able to handle 100 employee records, 10 leave type records, 10000 leave entitlement records, and 50000 leave application records. The program should comprise classes as defined below.
Create a program which comprises the modules as described below:
(a) User Login Module. This module allows the user to login as either Super Administrator, System Administrator or System User. The login credentials for Super Administrator are hardcoded as, User Name: SUPERADMIN and Password: B1T2lO2. For other user accounts, the login credentials are empID and password as recorded in the respective employee profile record. Only active users are allowed to login.
(b) System Administrator Module. This module is accessible by Super Administrator and System Administrator only, and allows the user to:
-Add, edit and delete employee profile records. Each of the employee profile records must be stored in an individual file (.txt). (5 marks)
-Add, edit and delete leave type records. Each of the leave type records must be stored in an individual file (.txt). (5 marks)
-Add, edit and delete employees leave entitlement records. The annual leave entitlement of each of the employees must be stored in an individual file (.txt). The rule for leave entitlement is as described below:
-Leave entitlement must only be assigned to employees based on the match of position as specified in employee profile record and applicableToPosition as specified in leave type record. (5 marks)
-Generate leave records report, based on the search of applicantID. The generated leave records report must be printed to the terminal screen. (5marks)
-Generate leave records report, based on the search of leaveTypeID. The generated leave records report must be printed to the terminal screen. (5marks)
(c) Leave Application Module. This module allows all the active users to:
-Apply leave. The rules for leave application are as described below:
-fromDate must be earlier than or equivalent to toDate.
-fromDate must be later than the system date by the number of days as defined in applicationDay of the selected Leave Type.
-Total number of days applied for a leave must not be more than the leave balance of the employees leave entitlement record (leave balance = entitlement usage).
-ApproverID must be automatically captured based on the description as below:
Let A be the superior of B, B be the superior of C, and C be the superior of D.
Scenario 1:
When D applies for a leave which the approvalLevel is 1, C will be recorded the approver of the application.
Scenario 2:
When D applies for a leave which the approvalLevel is 2, B will be recorded the approver of the application.
Scenario 3:
When D applies for a leave which the approvalLevel is 3, A will be recorded the approver of the application.
Scenario 4:
When C applies for a leave which the approvalLevel is 2, A will be recorded the approver of the application.
Scenario 5:
When B applies for a leave which the approvalLevel is 1, A will be recorded the approver of the application.
- Edit leave. The rules for leave record edit are as described below: List only the leave records which:
(a) applicantID is equivalent to the logged-in employees empID, and
(b) status is P (pending) and
(c) fromDate is earlier than or equivalent to the system date for the user to select the leave record to edit. (5 marks)
-Cancel leave. The rules for leave record cancellation are as described below:
- List only the leave records which:
(a) applicantID is equivalent to the logged-in employees empID, and
(b) status is P (pending) or A (approved), and
(c) fromDate is earlier than or equivalent to the system date for the user to select the leave record to edit. (5 marks)
(d) Leave Approval Module. This module allows the active employees to:
- List only the leave records which approverID is equivalent to the logged-in employees empID and fromDate is earlier than or equivalent to the system date, for the user to select the leave record to make a decision. (5 marks)
- For approved record, the number of days applied is calculated based on fromDate and toDate, and will be added to usage of the applicants leave entitlement record. (10 marks)
(e) Implement the best practices for writing an object-oriented program. Best practices may include codes reusability, modularity, robustness in handling user inputs, abstraction, encapsulation, remarks and comments, reasonable naming of identifiers, indentations, screen layout and report layout. (5 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started