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
Modifier and TypeFieldDescriptionprivate String
The ID of the projectprivate String
the title of the project(package private) ProjectStatus
the status of the projectprivate String
the student of the projectprivate String
the supervisor of the project -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
assignStudent
(String studentID) Assign a student to the projectvoid
Display the whole information of the projectprivate void
Display the ID of the projectprivate void
Display the information of the projectprivate void
Display the information of the studentprivate void
displaySupervisorInformation
(String supervisorID) Display the information of the supervisorReturns the formatted string representation of the object.getID()
Get the ID of the projectprivate String
Display the information of the project.private String
Display the information of the student.private String
Display the information of the supervisor.private String
Display 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 projectvoid
setProjectTitle
(String projectTitle) Set the title of the projectvoid
setStatus
(ProjectStatus status) Set the status of the projectvoid
setStudentID
(String studentID) Set the student ID of the projectvoid
setSupervisorID
(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:Displayable
Returns the formatted string representation of the object.- Specified by:
getDisplayableString
in interfaceDisplayable
- Returns:
- the formatted string representation of the object.
-
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 interfaceDisplayable
- Returns:
- the splitter used to separate different fields of the object in the formatted string representation.
-