Class Project

java.lang.Object
main.model.project.Project
All Implemented Interfaces:
Displayable, Model, Mappable

public class Project extends Object implements Model, Displayable
The class of the project
  • Field Details

    • status

      the status of the project
    • projectID

      private String projectID
      The ID of the project
    • supervisorID

      private String supervisorID
      the supervisor of the project
    • studentID

      private String studentID
      the student of the project
    • projectTitle

      private String projectTitle
      the title of the project
  • Constructor Details

    • Project

      public Project(String projectID, String projectTitle, String supervisorID)
      the constructor of the project
      Parameters:
      projectID - the ID of the project
      projectTitle - the title of the project
      supervisorID - the supervisor of the project
    • Project

      public Project(Map<String,String> map)
      Get the ID of the project
      Parameters:
      map - the map of the project
  • Method Details

    • displaySupervisorInformation

      private void displaySupervisorInformation(String supervisorID)
      Display the information of the supervisor
    • displayStudentInformation

      private void displayStudentInformation()
      Display the information of the student
    • displayProjectID

      private void displayProjectID()
      Display the ID of the project
    • displayProjectInformation

      private void displayProjectInformation()
      Display the information of the project
    • displayProject

      public void displayProject()
      Display the whole information of the project
    • assignStudent

      public void assignStudent(String studentID) throws IllegalStateException
      Assign a student to the project
      Parameters:
      studentID - the student to be assigned
      Throws:
      IllegalStateException - if the project is not available for allocation
    • getStudentID

      public String getStudentID()
      Get the student ID of the project
      Returns:
      the student ID of the project
    • setStudentID

      public void setStudentID(String studentID)
      Set the student ID of the project
      Parameters:
      studentID - the student ID of the project
    • getSupervisorID

      public String getSupervisorID()
      Get the supervisor ID of the project
      Returns:
      the supervisor ID of the project
    • setSupervisorID

      public void setSupervisorID(String supervisorID)
      Set the supervisor ID of the project
      Parameters:
      supervisorID - the supervisor ID of the project
    • getProjectTitle

      public String getProjectTitle()
      Returns:
      the title of the project
    • setProjectTitle

      public void setProjectTitle(String projectTitle)
      Set the title of the project
      Parameters:
      projectTitle - the title of the project
    • getStatus

      public ProjectStatus getStatus()
      Get the status of the project
      Returns:
      the status of the project
    • setStatus

      public void setStatus(ProjectStatus status)
      Set the status of the project
      Parameters:
      status - the status of the project
    • getID

      public String getID()
      Get the ID of the project
      Specified by:
      getID in interface Model
      Returns:
      the ID of the project
    • getProjectSupervisorInformationString

      private String getProjectSupervisorInformationString()
      Display the information of the supervisor.
    • getProjectStudentInformationString

      private String getProjectStudentInformationString()
      Display the information of the student.
    • getProjectInformationString

      private String getProjectInformationString()
      Display the information of the project.
    • getSingleProjectString

      private String getSingleProjectString()
      Display the complete information of the project.
    • getDisplayableString

      public String getDisplayableString()
      Description copied from interface: Displayable
      Returns the formatted string representation of the object.
      Specified by:
      getDisplayableString in interface Displayable
      Returns:
      the formatted string representation of the object.
    • getSplitter

      public String getSplitter()
      Description copied from interface: Displayable
      Returns the splitter used to separate different fields of the object in the formatted string representation.
      Specified by:
      getSplitter in interface Displayable
      Returns:
      the splitter used to separate different fields of the object in the formatted string representation.