Package services

Class CampStudentService

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.ArrayList<Camp> getAvailableCamps​(Schools school)
      Retrieves the available camps for a specific school.
      java.util.ArrayList<Camp> getRegisteredCamps​(java.lang.String studentID)
      Retrieves the camps registered by a specific student.
      boolean registerForCamp​(java.lang.String studentID, int campID, boolean committee)
      Registers a student for a specific camp.
      boolean withdrawFromCamp​(java.lang.String studentID, int campID)
      Withdraws a student from a specific camp.
      • Methods inherited from class java.lang.Object

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

      • CampStudentService

        public CampStudentService()
        Construct an instance of CampStudentService
    • Method Detail

      • getAvailableCamps

        public java.util.ArrayList<Camp> getAvailableCamps​(Schools school)
        Description copied from interface: ICampStudentService
        Retrieves the available camps for a specific school.
        Specified by:
        getAvailableCamps in interface ICampStudentService
        Parameters:
        school - The school for which available camps are to be retrieved.
        Returns:
        An ArrayList of Camps containing the available camps.
      • getRegisteredCamps

        public java.util.ArrayList<Camp> getRegisteredCamps​(java.lang.String studentID)
        Description copied from interface: ICampStudentService
        Retrieves the camps registered by a specific student.
        Specified by:
        getRegisteredCamps in interface ICampStudentService
        Parameters:
        studentID - The ID of the student for whom registered camps are to be retrieved.
        Returns:
        An ArrayList of Camps containing the registered camps.
      • registerForCamp

        public boolean registerForCamp​(java.lang.String studentID,
                                       int campID,
                                       boolean committee)
        Description copied from interface: ICampStudentService
        Registers a student for a specific camp.
        Specified by:
        registerForCamp in interface ICampStudentService
        Parameters:
        studentID - The ID of the student to be registered.
        campID - The ID of the camp for registration.
        committee - A boolean indicating whether the student wants to become a committee.
        Returns:
        true if the registration is successful, false otherwise.
      • withdrawFromCamp

        public boolean withdrawFromCamp​(java.lang.String studentID,
                                        int campID)
        Description copied from interface: ICampStudentService
        Withdraws a student from a specific camp.
        Specified by:
        withdrawFromCamp in interface ICampStudentService
        Parameters:
        studentID - The ID of the student to be withdrawn.
        campID - The ID of the camp for withdrawal.
        Returns:
        true if the withdrawal is successful, false otherwise.