Package main.model.project
Class Project
java.lang.Object
main.model.project.Project
- All Implemented Interfaces:
Displayable,Model,Mappable
The class of the project
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringThe ID of the projectprivate Stringthe title of the project(package private) ProjectStatusthe status of the projectprivate Stringthe student of the projectprivate Stringthe supervisor of the project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassignStudent(String studentID) Assign a student to the projectvoidDisplay the whole information of the projectprivate voidDisplay the ID of the projectprivate voidDisplay the information of the projectprivate voidDisplay the information of the studentprivate voiddisplaySupervisorInformation(String supervisorID) Display the information of the supervisorReturns the formatted string representation of the object.getID()Get the ID of the projectprivate StringDisplay the information of the project.private StringDisplay the information of the student.private StringDisplay the information of the supervisor.private StringDisplay the complete information of the project.Returns the splitter used to separate different fields of the object in the formatted string representation.Get the status of the projectGet the student ID of the projectGet the supervisor ID of the projectvoidsetProjectTitle(String projectTitle) Set the title of the projectvoidsetStatus(ProjectStatus status) Set the status of the projectvoidsetStudentID(String studentID) Set the student ID of the projectvoidsetSupervisorID(String supervisorID) Set the supervisor ID of the project
-
Field Details
-
status
ProjectStatus statusthe status of the project -
projectID
The ID of the project -
supervisorID
the supervisor of the project -
studentID
the student of the project -
projectTitle
the title of the project
-
-
Constructor Details
-
Project
the constructor of the project- Parameters:
projectID- the ID of the projectprojectTitle- the title of the projectsupervisorID- the supervisor of the project
-
Project
Get the ID of the project- Parameters:
map- the map of the project
-
-
Method Details
-
displaySupervisorInformation
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
Assign a student to the project- Parameters:
studentID- the student to be assigned- Throws:
IllegalStateException- if the project is not available for allocation
-
getStudentID
Get the student ID of the project- Returns:
- the student ID of the project
-
setStudentID
Set the student ID of the project- Parameters:
studentID- the student ID of the project
-
getSupervisorID
Get the supervisor ID of the project- Returns:
- the supervisor ID of the project
-
setSupervisorID
Set the supervisor ID of the project- Parameters:
supervisorID- the supervisor ID of the project
-
getProjectTitle
- Returns:
- the title of the project
-
setProjectTitle
Set the title of the project- Parameters:
projectTitle- the title of the project
-
getStatus
Get the status of the project- Returns:
- the status of the project
-
setStatus
Set the status of the project- Parameters:
status- the status of the project
-
getID
Get the ID of the project -
getProjectSupervisorInformationString
Display the information of the supervisor. -
getProjectStudentInformationString
Display the information of the student. -
getProjectInformationString
Display the information of the project. -
getSingleProjectString
Display the complete information of the project. -
getDisplayableString
Description copied from interface:DisplayableReturns the formatted string representation of the object.- Specified by:
getDisplayableStringin interfaceDisplayable- Returns:
- the formatted string representation of the object.
-
getSplitter
Description copied from interface:DisplayableReturns the splitter used to separate different fields of the object in the formatted string representation.- Specified by:
getSplitterin interfaceDisplayable- Returns:
- the splitter used to separate different fields of the object in the formatted string representation.
-