Package com.ntu.fdae.group1.bto.views
Class ApplicantUI
java.lang.Object
com.ntu.fdae.group1.bto.views.BaseUI
com.ntu.fdae.group1.bto.views.ApplicantUI
User interface for Applicant users in the BTO Management System.
This class provides a console-based interface for applicants to interact with the system. It allows applicants to: - Browse available BTO projects - Apply for BTO flats - View and withdraw applications - Submit and manage enquiries - Change their password
The UI follows a menu-driven approach, with each option delegating 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
ConstructorsConstructorDescriptionApplicantUI
(Applicant user, UserController userCtrl, ProjectController projCtrl, ApplicationController appCtrl, EnquiryController enqCtrl, AuthenticationController authCtrl, Scanner scanner) Constructs a new ApplicantUI with the specified dependencies. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Displays the main menu for applicant 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
-
ApplicantUI
public ApplicantUI(Applicant user, UserController userCtrl, ProjectController projCtrl, ApplicationController appCtrl, EnquiryController enqCtrl, AuthenticationController authCtrl, Scanner scanner) Constructs a new ApplicantUI with the specified dependencies.- Parameters:
user
- The authenticated applicant useruserCtrl
- Controller for user operationsprojCtrl
- Controller for project operationsappCtrl
- Controller for application 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 applicant users and handles their selections.This method shows a menu of options available to applicants and delegates to specific handler methods based on user input. It runs in a loop until the user chooses to log out.
-