- java.lang.Object
-
- controllers.UserController
-
- controllers.SupervisorController
-
- Direct Known Subclasses:
FYPCoordinatorController
public class SupervisorController extends UserController
TheSupervisorControllerclass handles the user interactions for supervisors. It is responsible for displaying the supervisor menu, executing actions based on user input, and managing the views and services associated with the supervisor's tasks. This class utilizesIProjectSupervisorServiceandIRequestSupervisorServiceto interact with the underlying data and perform necessary operations.
-
-
Field Summary
Fields Modifier and Type Field Description protected static IProjectSupervisorServiceprojectSupervisorServiceThe project supervisor service used to perform operations on projects.protected static IProjectViewprojectViewThe project view used to display project information.protected static IRequestSupervisorServicerequestSupervisorServiceThe request supervisor service used to perform operations on requests.protected static IRequestViewrequestViewThe request view used to display request information.private static java.util.ScannerscScannerobject to get input from the user.
-
Constructor Summary
Constructors Constructor Description SupervisorController()Constructs an instance of theSupervisorControllerclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateProjects()Creates new projects based on user input and adds them to the supervisor's project list.protected voiddisplayRequests(java.util.ArrayList<Request> requests)Helper method to display the request information for a list of requests.protected voidrequestStudentTransfer()Allows the supervisor to initiate a student transfer request by selecting a project and a replacement supervisor.voidstart()Starts the supervisor controller and displays the main menu for the supervisor.protected voidupdateProject()Allows the supervisor to update the title of a selected project.protected voidviewApproveRejectPendingRequest()Displays a list of pending requests for the supervisor to approve or reject.protected voidviewProjects()Displays the submitted projects of the supervisor.protected voidviewRequests()Displays the incoming and outgoing requests for the supervisor.-
Methods inherited from class controllers.UserController
changePassword
-
-
-
-
Field Detail
-
sc
private static final java.util.Scanner sc
Scannerobject to get input from the user.
-
projectSupervisorService
protected static final IProjectSupervisorService projectSupervisorService
The project supervisor service used to perform operations on projects.
-
requestSupervisorService
protected static final IRequestSupervisorService requestSupervisorService
The request supervisor service used to perform operations on requests.
-
projectView
protected static IProjectView projectView
The project view used to display project information.
-
requestView
protected static IRequestView requestView
The request view used to display request information.
-
-
Constructor Detail
-
SupervisorController
public SupervisorController()
Constructs an instance of theSupervisorControllerclass.
-
-
Method Detail
-
start
public void start()
Starts the supervisor controller and displays the main menu for the supervisor. The user can interact with the menu to perform actions like changing password, creating projects, updating projects, viewing projects, and handling requests.
-
createProjects
protected void createProjects()
Creates new projects based on user input and adds them to the supervisor's project list.
-
updateProject
protected void updateProject()
Allows the supervisor to update the title of a selected project.
-
viewProjects
protected void viewProjects()
Displays the submitted projects of the supervisor.
-
viewApproveRejectPendingRequest
protected void viewApproveRejectPendingRequest()
Displays a list of pending requests for the supervisor to approve or reject.
-
viewRequests
protected void viewRequests()
Displays the incoming and outgoing requests for the supervisor.
-
displayRequests
protected void displayRequests(java.util.ArrayList<Request> requests)
Helper method to display the request information for a list of requests.- Parameters:
requests- anArrayListofRequestobjects to be displayed
-
requestStudentTransfer
protected void requestStudentTransfer()
Allows the supervisor to initiate a student transfer request by selecting a project and a replacement supervisor.
-
-