Package sc2002.FCS1.grp2
Class HDBOfficerActions
Object
HDBOfficerActions
- All Implemented Interfaces:
IUserActions
User interactable actions for when logged in user is of HDB Officer role
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidbookApplication(HDBOfficer officer) Method to help applicants to book an application for a flatprivate static voidcheckProjectApplicationStatus(HDBOfficer officer) Method to check the project application status for HDB Officer as an officer.private static booleandatesOverlap(LocalDate start1, LocalDate end1, LocalDate start2, LocalDate end2) helper function to check with date overlapsprivate static voidenquiriesSystemFlow(HDBOfficer officer) Method to handle the enquiries system flow for HDB Officer.static voidhandleAction(HDBOfficer.Menu option, HDBOfficer user) Handles user input selection fromBTOManagementApplicationstatic voidjoinProject(HDBOfficer user) Method which checks pre-req before letting HDB Officer submit their name for approval for a project.private static voidviewProjects(HDBOfficer officer) Method to view available projects for HDB Officer as an applicant to join
-
Field Details
-
system
-
-
Constructor Details
-
HDBOfficerActions
public HDBOfficerActions()
-
-
Method Details
-
handleAction
Handles user input selection fromBTOManagementApplication- Throws:
Exception
-
bookApplication
Method to help applicants to book an application for a flat- Parameters:
officer- HDB Officer- Throws:
Exception- if any error occurs during the booking process
-
enquiriesSystemFlow
Method to handle the enquiries system flow for HDB Officer. This method allows the officer to view the enquiries list, send an enquiry as an applicant, or go back to the main menu.- Parameters:
officer- HDB Officer- Throws:
Exception- if any error occurs during the enquiries system flow
-
checkProjectApplicationStatus
Method to check the project application status for HDB Officer as an officer. This method displays the approved and pending projects for the officer.- Parameters:
officer- HDB Officer- Throws:
Exception- if any error occurs during the project application status check
-
viewProjects
Method to view available projects for HDB Officer as an applicant to join- Parameters:
officer- HDB Officer- Throws:
Exception- if any error occurs during the project viewing process
-
joinProject
Method which checks pre-req before letting HDB Officer submit their name for approval for a project.- Parameters:
user- HDB Officer- Throws:
Exception
-
datesOverlap
private static boolean datesOverlap(LocalDate start1, LocalDate end1, LocalDate start2, LocalDate end2) helper function to check with date overlaps- Parameters:
start1- start date of project officer is handlingend1- end date of project officer is handlingstart2- start date of project officer is applying forend2- end date of project officer is applying for- Returns:
- true if the two projects overlap, false otherwise
-