- java.lang.Object
-
- controllers.UserController
-
- controllers.StudentController
-
public class StudentController extends UserController
TheStudentControllerclass is responsible for handling the student-specific user interface and user interactions. It extends theUserControllerclass and provides functionality for students to view available projects, view allocated projects, send project allocation requests, request project title changes, and request FYP deregistration. This class utilizesIProjectStudentServiceandIRequestStudentServiceto interact with the underlying data and perform necessary operations.
-
-
Field Summary
Fields Modifier and Type Field Description private static IProjectStudentServiceprojectStudentServiceTheIProjectStudentServiceinstance used for accessing project data and services for students.private static IRequestStudentServicerequestStudentServiceTheIRequestStudentServiceinstance used for accessing request data and services for students.protected static IRequestViewrequestViewThe project view used to display project information.private static java.util.ScannerscScannerobject to get input from the user.
-
Constructor Summary
Constructors Constructor Description StudentController()Constructs an instance of theStudentControllerclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidrequestFYPDeregistration()Sends a request for FYP deregistration.private voidrequestTitleChange()Sends a request for a project title change.private voidsendProjectToCoordinator()Sends a project allocation request to the FYP coordinator.voidstart()Starts the student menu and prompts the user to select an action.private voidviewAllocatedProject(IProjectView projectView)Displays the allocated project for the current student.private voidviewAvailableProject(IProjectView projectView)Displays the list of available projects for the current student.private voidviewRequests()Displays the request status and history for the current student.-
Methods inherited from class controllers.UserController
changePassword
-
-
-
-
Field Detail
-
sc
private static final java.util.Scanner sc
Scannerobject to get input from the user.
-
projectStudentService
private static final IProjectStudentService projectStudentService
TheIProjectStudentServiceinstance used for accessing project data and services for students.
-
requestStudentService
private static final IRequestStudentService requestStudentService
TheIRequestStudentServiceinstance used for accessing request data and services for students.
-
requestView
protected static IRequestView requestView
The project view used to display project information.
-
-
Constructor Detail
-
StudentController
public StudentController()
Constructs an instance of theStudentControllerclass.
-
-
Method Detail
-
start
public void start()
Starts the student menu and prompts the user to select an action. The method loops until the user chooses to exit the student menu.
-
viewAllocatedProject
private void viewAllocatedProject(IProjectView projectView)
Displays the allocated project for the current student.- Parameters:
projectView- theIProjectViewinstance for displaying project information
-
viewAvailableProject
private void viewAvailableProject(IProjectView projectView)
Displays the list of available projects for the current student.- Parameters:
projectView- theIProjectViewinstance for displaying project information
-
viewRequests
private void viewRequests()
Displays the request status and history for the current student.
-
sendProjectToCoordinator
private void sendProjectToCoordinator()
Sends a project allocation request to the FYP coordinator.
-
requestTitleChange
private void requestTitleChange()
Sends a request for a project title change.
-
requestFYPDeregistration
private void requestFYPDeregistration()
Sends a request for FYP deregistration.
-
-