Module sc2002_fypms
Package models

Class DeregisterProjectRequest


  • public class DeregisterProjectRequest
    extends Request
    The DeregisterProjectRequest class represents a request made by a student to deregister a project. It is a subclass of the Request class and includes methods to approve and update the status of the request.
    • Field Detail

      • studentID

        private java.lang.String studentID
        The ID of the student sending the deregistration request.
    • Constructor Detail

      • DeregisterProjectRequest

        public DeregisterProjectRequest​(java.lang.String senderID,
                                        java.lang.String receiverID,
                                        int projectID,
                                        int requestID,
                                        RequestStatus status,
                                        java.util.ArrayList<java.lang.String> history)
        This constructor initializes an existing DeregisterProjectRequest object.
        Parameters:
        senderID - the ID of the sender of the request
        receiverID - the ID of the receiver of the request
        projectID - the ID of the project associated with the request
        requestID - the ID of the request
        status - the current status of the request
        history - the list of statuses that the request went through
      • DeregisterProjectRequest

        public DeregisterProjectRequest​(java.lang.String senderID,
                                        java.lang.String receiverID,
                                        int projectID)
        This constructor creates a new DeregisterProjectRequest object.
        Parameters:
        senderID - the ID of the sender of the request
        receiverID - the ID of the receiver of the request
        projectID - the ID of the project associated with the request
    • Method Detail

      • approve

        public boolean approve()
        This method approves the DeregisterProjectRequest. It updates the status of the request, the status and availability of the project, and the number of projects supervised by the project's supervisor.
        Overrides:
        approve in class Request
        Returns:
        true if data is successfully saved to CSV, false otherwise