- java.lang.Object
-
- controllers.UserController
-
- controllers.SupervisorController
-
- Direct Known Subclasses:
FYPCoordinatorController
public class SupervisorController extends UserController
TheSupervisorController
class 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 utilizesIProjectSupervisorService
andIRequestSupervisorService
to interact with the underlying data and perform necessary operations.
-
-
Field Summary
Fields Modifier and Type Field Description protected static IProjectSupervisorService
projectSupervisorService
The project supervisor service used to perform operations on projects.protected static IProjectView
projectView
The project view used to display project information.protected static IRequestSupervisorService
requestSupervisorService
The request supervisor service used to perform operations on requests.protected static IRequestView
requestView
The request view used to display request information.private static java.util.Scanner
sc
Scanner
object to get input from the user.
-
Constructor Summary
Constructors Constructor Description SupervisorController()
Constructs an instance of theSupervisorController
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createProjects()
Creates new projects based on user input and adds them to the supervisor's project list.protected void
displayRequests(java.util.ArrayList<Request> requests)
Helper method to display the request information for a list of requests.protected void
requestStudentTransfer()
Allows the supervisor to initiate a student transfer request by selecting a project and a replacement supervisor.void
start()
Starts the supervisor controller and displays the main menu for the supervisor.protected void
updateProject()
Allows the supervisor to update the title of a selected project.protected void
viewApproveRejectPendingRequest()
Displays a list of pending requests for the supervisor to approve or reject.protected void
viewProjects()
Displays the submitted projects of the supervisor.protected void
viewRequests()
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
Scanner
object 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 theSupervisorController
class.
-
-
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
- anArrayList
ofRequest
objects to be displayed
-
requestStudentTransfer
protected void requestStudentTransfer()
Allows the supervisor to initiate a student transfer request by selecting a project and a replacement supervisor.
-
-