- java.lang.Object
-
- services.CampStudentService
-
- All Implemented Interfaces:
ICampStudentService
public class CampStudentService extends java.lang.Object implements ICampStudentService
CampStudentServiceimplementsICampStudentServiceinterface and provide camp functions in the role permission of a student
-
-
Constructor Summary
Constructors Constructor Description CampStudentService()Construct an instance ofCampStudentService
-
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.booleanregisterForCamp(java.lang.String studentID, int campID, boolean committee)Registers a student for a specific camp.booleanwithdrawFromCamp(java.lang.String studentID, int campID)Withdraws a student from a specific camp.
-
-
-
Constructor Detail
-
CampStudentService
public CampStudentService()
Construct an instance ofCampStudentService
-
-
Method Detail
-
getAvailableCamps
public java.util.ArrayList<Camp> getAvailableCamps(Schools school)
Description copied from interface:ICampStudentServiceRetrieves the available camps for a specific school.- Specified by:
getAvailableCampsin interfaceICampStudentService- Parameters:
school- The school for which available camps are to be retrieved.- Returns:
- An
ArrayListofCamps containing the available camps.
-
getRegisteredCamps
public java.util.ArrayList<Camp> getRegisteredCamps(java.lang.String studentID)
Description copied from interface:ICampStudentServiceRetrieves the camps registered by a specific student.- Specified by:
getRegisteredCampsin interfaceICampStudentService- Parameters:
studentID- The ID of the student for whom registered camps are to be retrieved.- Returns:
- An
ArrayListofCamps containing the registered camps.
-
registerForCamp
public boolean registerForCamp(java.lang.String studentID, int campID, boolean committee)Description copied from interface:ICampStudentServiceRegisters a student for a specific camp.- Specified by:
registerForCampin interfaceICampStudentService- 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:
trueif the registration is successful,falseotherwise.
-
withdrawFromCamp
public boolean withdrawFromCamp(java.lang.String studentID, int campID)Description copied from interface:ICampStudentServiceWithdraws a student from a specific camp.- Specified by:
withdrawFromCampin interfaceICampStudentService- Parameters:
studentID- The ID of the student to be withdrawn.campID- The ID of the camp for withdrawal.- Returns:
trueif the withdrawal is successful,falseotherwise.
-
-