Package controllers

Class StudentController

  • Direct Known Subclasses:
    CommitteeController

    public class StudentController
    extends UserController
    The StudentController class is responsible for handling the student-specific user interface and user interactions. It extends the UserController class and provides functionality for students to view available camps, register and withdraw from camps, and make enquires. This class utilizes ICampStudentService to interact with underlying data and perform operations
    • Constructor Summary

      Constructors 
      Constructor Description
      StudentController()
      Default constructor for StudentController
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void deleteEnquiry()
      Allows the student to delete an existing enquiry.
      private void editEnquiry()
      Allows the student to edit an existing enquiry.
      private void register()
      Allows the current student to register for a camp, choosing between attendee and camp committee member roles.
      void start()
      Starts the student controller, provides access to various functionalities based on the user's choice.
      private void submitEnquiry()
      Allows the student to submit a new enquiry for a specific camp.
      private void viewAvailableCamps​(ICampView campView)
      Displays available camps to the student based on their school and visibility.
      private void viewEnquiries​(IEnquiryView enquiryView)
      Allows the student to view their own enquiries.
      private void viewRegisteredCamps​(ICampView campView)
      Displays camps that the student is registered for and allows them to view detailed information.
      private void withdraw()
      Allows the current student to withdraw from a camp they are registered for.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • sc

        protected static final java.util.Scanner sc
        Scanner object to get input
      • campStudentService

        private static final ICampStudentService campStudentService
        This class has-a ICampStudentService object which the StudentController object is able to access all the services given.
      • enquiryStudentService

        private static final IEnquiryStudentService enquiryStudentService
        This class has-a IEnquiryStudentService object which the StudentController object can access all the services that the enquiry class gives.
    • Constructor Detail

      • StudentController

        public StudentController()
        Default constructor for StudentController
    • Method Detail

      • start

        public void start()
        Starts the student controller, provides access to various functionalities based on the user's choice. Functions such as view available/registered camps, register camps, submit/edit/delete enquiries.
      • viewAvailableCamps

        private void viewAvailableCamps​(ICampView campView)
        Displays available camps to the student based on their school and visibility. It allows student to view detailed information.
        Parameters:
        campView - The view interface for displaying camp details.
      • viewRegisteredCamps

        private void viewRegisteredCamps​(ICampView campView)
        Displays camps that the student is registered for and allows them to view detailed information.
        Parameters:
        campView - The view interface for displaying camp details.
      • register

        private void register()
        Allows the current student to register for a camp, choosing between attendee and camp committee member roles.
      • withdraw

        private void withdraw()
        Allows the current student to withdraw from a camp they are registered for.
      • viewEnquiries

        private void viewEnquiries​(IEnquiryView enquiryView)
        Allows the student to view their own enquiries.
        Parameters:
        enquiryView - The view interface for displaying enquiry details.
      • submitEnquiry

        private void submitEnquiry()
        Allows the student to submit a new enquiry for a specific camp.
      • editEnquiry

        private void editEnquiry()
        Allows the student to edit an existing enquiry.
      • deleteEnquiry

        private void deleteEnquiry()
        Allows the student to delete an existing enquiry.