Class Display
java.lang.Object
utils.Display
Utility class containing static methods for displaying formatted information
about various entity objects (Applicants, Officers, Managers, Projects, Requests)
to the standard console output. Provides different views based on context (e.g., user type).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddisplayApplicant(Applicant user, boolean profile) Displays formatted information about an Applicant.static voiddisplayManager(Manager user) Displays formatted information about a Manager.static voiddisplayOfficer(Officer user) Displays formatted information about an Officer.static voiddisplayProject(Project project, UserType user, FlatType flatType) Displays formatted information about a Project.static voiddisplayRequest(Request request, UserType userType) Displays formatted information about a Request.
-
Constructor Details
-
Display
public Display()
-
-
Method Details
-
displayApplicant
Displays formatted information about an Applicant. Ifprofileis true, it includes details about the applied project and application status history. Always shows basic details like name, ID, age, marital status, and applied flat type if applicable.- Parameters:
user- TheApplicantobject to display.profile- If true, display extended profile information including application history; if false, display basic information.
-
displayOfficer
-
displayManager
-
displayProject
Displays formatted information about a Project. The level of detail depends on theusertype viewing the project. TheflatTypeparameter can filter the display of units and prices (e.g., if viewing as an applicant only eligible for TWO_ROOM, THREE_ROOM details might be hidden). -
displayRequest
Displays formatted information about a Request. Adjusts displayed details based on theuserTypeviewing the request (e.g., hides User ID for Applicants). Displays specific status or query/answer details based on the actual subclass of the Request (OfficerRegistration, BTOApplication, BTOWithdrawal, Enquiry).
-