- java.lang.Object
-
- controllers.UserController
-
- controllers.StudentController
-
public class StudentController extends UserController
TheStudentController
class is responsible for handling the student-specific user interface and user interactions. It extends theUserController
class 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 utilizesIProjectStudentService
andIRequestStudentService
to interact with the underlying data and perform necessary operations.
-
-
Field Summary
Fields Modifier and Type Field Description private static IProjectStudentService
projectStudentService
TheIProjectStudentService
instance used for accessing project data and services for students.private static IRequestStudentService
requestStudentService
TheIRequestStudentService
instance used for accessing request data and services for students.protected static IRequestView
requestView
The project view used to display project information.private static java.util.Scanner
sc
Scanner
object to get input from the user.
-
Constructor Summary
Constructors Constructor Description StudentController()
Constructs an instance of theStudentController
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
requestFYPDeregistration()
Sends a request for FYP deregistration.private void
requestTitleChange()
Sends a request for a project title change.private void
sendProjectToCoordinator()
Sends a project allocation request to the FYP coordinator.void
start()
Starts the student menu and prompts the user to select an action.private void
viewAllocatedProject(IProjectView projectView)
Displays the allocated project for the current student.private void
viewAvailableProject(IProjectView projectView)
Displays the list of available projects for the current student.private void
viewRequests()
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
Scanner
object to get input from the user.
-
projectStudentService
private static final IProjectStudentService projectStudentService
TheIProjectStudentService
instance used for accessing project data and services for students.
-
requestStudentService
private static final IRequestStudentService requestStudentService
TheIRequestStudentService
instance 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 theStudentController
class.
-
-
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
- theIProjectView
instance for displaying project information
-
viewAvailableProject
private void viewAvailableProject(IProjectView projectView)
Displays the list of available projects for the current student.- Parameters:
projectView
- theIProjectView
instance 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.
-
-