Class Camp

All Implemented Interfaces:
IFilterableByAttendee<Camp>, IFilterableByCampCommittee<Camp>, IFilterableByDateRange<Camp>, IFilterableByID<Camp>, IFilterableBySchool<Camp>, IFilterableByStudent<Camp>, IFilterableByVisibility<Camp>, ISerializable, ISortableByEndDate<Camp>, ISortableByID<Camp>, ISortableByLocation<Camp>, ISortableByName<Camp>, ISortableByRegistrationCloseDate<Camp>, ISortableByStartingDate<Camp>, ITaggedItem, Iterable<Camp>

public class Camp extends CampDetails implements ITaggedItem
The Camp class represents a camp, extending the CampDetails class with additional features. It includes details about the staff in charge, attendees, and committees involved in the camp. The class provides methods to manage these aspects and create suggestion plans for camp modifications.

Key features:

  • Management of staff in charge.
  • Handling attendees and committees.
  • Adding and removing students from attendees and committees.
  • Creating suggestion plans for camps.
See Also:
  • Field Details

    • staffInCharge

      protected Staff staffInCharge
    • attendees

      protected Set<Student> attendees
    • committees

      protected Set<Student> committees
    • registeredStudents

      protected Set<Student> registeredStudents
    • MAX_COMMITTEE

      public static final int MAX_COMMITTEE
      See Also:
  • Constructor Details

    • Camp

      public Camp(String ID, String name, String description, Boolean visibility, Date startDate, Date endDate, Date closeRegistrationDate, String school, String location, Staff staffInCharge, int totalSlots, int totalCommitteeSlots)
      Constructs a new Camp instance with specified details.
      Parameters:
      ID - Unique identifier for the camp.
      name - Name of the camp.
      description - Description of the camp.
      visibility - Visibility status of the camp.
      startDate - Start date of the camp.
      endDate - End date of the camp.
      closeRegistrationDate - Closing date for registration.
      school - School associated with the camp.
      location - Location of the camp.
      staffInCharge - Staff member in charge of the camp.
      totalSlots - Total number of slots available in the camp.
      totalCommitteeSlots - Total number of committee slots available in the camp.
  • Method Details

    • getStaffInCharge

      public Staff getStaffInCharge()
      Retrieves the staff member in charge of the camp.
      Returns:
      Staff The staff member in charge.
    • getAttendees

      public Set<Student> getAttendees()
    • getAttendeesAndCommittees

      public Set<Student> getAttendeesAndCommittees()
    • getCommittees

      public Set<Student> getCommittees()
    • setStaffInCharge

      public void setStaffInCharge(Staff staffInCharge)
      Sets the staff member in charge of the camp.
      Parameters:
      staffInCharge - The staff member to be set as in charge.
    • setAttendees

      public void setAttendees(Set<Student> attendees)
    • setCommittees

      public void setCommittees(Set<Student> committees)
    • addAttendee

      public boolean addAttendee(Student attendee)
      Adds a student as an attendee of the camp.
      Parameters:
      attendee - The student to be added as an attendee.
      Returns:
      boolean True if the student is successfully added.
    • addCommittee

      public boolean addCommittee(Student committee)
      Adds a student as a committee member of the camp.
      Parameters:
      committee - The student to be added as a committee member.
      Returns:
      boolean True if the student is successfully added.
    • removeAttendee

      public boolean removeAttendee(Student attendee)
      Removes a student from the list of attendees.
      Parameters:
      attendee - The student to be removed.
      Returns:
      boolean True if the student is successfully removed.
    • removeCommittee

      public boolean removeCommittee(Student committee)
    • createSuggestionPlan

      public CampDetails createSuggestionPlan()
      Creates a suggestion plan based on the current state of the camp. This plan can be used to suggest modifications or improvements to the camp.
      Returns:
      CampDetails A new CampDetails object representing the suggestion plan.
    • getSuggestionList

      public ArrayList<Suggestion> getSuggestionList()
      Retrieves the list of suggestions for the camp.
      Returns:
      The list of suggestions.
    • getEnquiryList

      public ArrayList<Enquiry> getEnquiryList()
      Retrieves the list of enquiries for the camp.
      Returns:
      The list of enquiries.
    • addSuggestion

      public void addSuggestion(Suggestion suggestion)
      Adds a suggestion to the list of suggestions.
      Parameters:
      suggestion - The suggestion to be added.
    • addEnquiry

      public void addEnquiry(Enquiry enquiry)
      Adds an enquiry to the list of enquiries.
      Parameters:
      enquiry - The enquiry to be added.
    • removeSuggestion

      public void removeSuggestion(Suggestion suggestion)
      Removes a suggestion from the list of suggestions.
      Parameters:
      suggestion - The suggestion to be removed.
    • removeEnquiry

      public void removeEnquiry(Enquiry enquiry)
      Removes an enquiry from the list of enquiries.
      Parameters:
      enquiry - The enquiry to be removed.
    • isStudentRegistered

      public boolean isStudentRegistered(Student student)
      Checks if a student is registered in the camp.
      Parameters:
      student - The student to check for registration.
      Returns:
      True if the student is registered, false otherwise.
    • addRegisteredStudent

      public void addRegisteredStudent(Student student)
      Adds a student to the list of registered students (used for deserialize only).
      Parameters:
      student - The student to be added.
    • getRegisteredStudents

      public Set<Student> getRegisteredStudents()
      Retrieves the list of previously registered students.