Class HDBOfficerUI
This class provides a console-based interface for HDB officers to interact with the system. It allows officers to perform both applicant-like operations and officer-specific duties, including: - Browsing and applying for BTO projects (as an applicant) - Managing their own applications and enquiries - Requesting registration to handle specific projects - Managing projects they are approved to handle - Processing bookings and generating receipts - Responding to project-related enquiries
The UI follows a menu-driven approach, with primary and sub-menu options that delegate to specific handler methods. It leverages various UI helper classes to manage complex operations while maintaining separation of concerns.
-
Field Summary
Fields inherited from class com.ntu.fdae.group1.bto.views.BaseUI
DATE_FORMATTER, scanner
-
Constructor Summary
ConstructorsConstructorDescriptionHDBOfficerUI
(HDBOfficer user, UserController userCtrl, ProjectController projCtrl, ApplicationController appCtrl, OfficerRegistrationController offRegCtrl, BookingController bookCtrl, ReceiptController receiptCtrl, EnquiryController enqCtrl, AuthenticationController authCtrl, Scanner scanner) Constructs a new HDBOfficerUI with the specified dependencies. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Displays the main menu for HDB officer users and handles their selections.Methods inherited from class com.ntu.fdae.group1.bto.views.BaseUI
clearConsole, displayError, displayHeader, displayList, displayMessage, formatDateSafe, formatEnumName, pause, promptForConfirmation, promptForDate, promptForDouble, promptForEnum, promptForInput, promptForInt, promptForPassword, promptForPasswordWithToggle
-
Constructor Details
-
HDBOfficerUI
public HDBOfficerUI(HDBOfficer user, UserController userCtrl, ProjectController projCtrl, ApplicationController appCtrl, OfficerRegistrationController offRegCtrl, BookingController bookCtrl, ReceiptController receiptCtrl, EnquiryController enqCtrl, AuthenticationController authCtrl, Scanner scanner) Constructs a new HDBOfficerUI with the specified dependencies.- Parameters:
user
- The authenticated HDB officer useruserCtrl
- Controller for user operationsprojCtrl
- Controller for project operationsappCtrl
- Controller for application operationsoffRegCtrl
- Controller for officer registration operationsbookCtrl
- Controller for booking operationsreceiptCtrl
- Controller for receipt operationsenqCtrl
- Controller for enquiry operationsauthCtrl
- Controller for authentication operationsscanner
- Scanner for reading user input- Throws:
NullPointerException
- if any parameter is null
-
-
Method Details
-
displayMainMenu
public void displayMainMenu()Displays the main menu for HDB officer users and handles their selections.This method shows a menu of options available to HDB officers, including applicant-like operations, officer-specific duties, and account management. It runs in a loop until the user chooses to log out, delegating to specific handler methods based on user input.
-