Package edu.pdx.cs.joy.jdbc
Class AcademicTerm
java.lang.Object
edu.pdx.cs.joy.jdbc.AcademicTerm
Represents an academic term (such as Fall 2024 or Spring 2025) during which courses are offered.
Each term has a unique ID, a name, and start and end dates.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new AcademicTerm with no initial values.AcademicTerm(int id, String name, LocalDate startDate, LocalDate endDate) Creates a new AcademicTerm with the specified ID, name, start date, and end date.AcademicTerm(String name, LocalDate startDate, LocalDate endDate) Creates a new AcademicTerm with the specified name, start date, and end date. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the end date of this academic term.intgetId()Returns the unique ID of this academic term.getName()Returns the name of this academic term.Returns the start date of this academic term.inthashCode()voidsetEndDate(LocalDate endDate) Sets the end date of this academic term.voidsetId(int id) Sets the unique ID of this academic term.voidSets the name of this academic term.voidsetStartDate(LocalDate startDate) Sets the start date of this academic term.toString()
-
Constructor Details
-
AcademicTerm
Creates a new AcademicTerm with the specified name, start date, and end date.- Parameters:
name- the name of the term (e.g., "Fall 2024")startDate- the start date of the termendDate- the end date of the term
-
AcademicTerm
Creates a new AcademicTerm with the specified ID, name, start date, and end date.- Parameters:
id- the unique identifier for the termname- the name of the term (e.g., "Fall 2024")startDate- the start date of the termendDate- the end date of the term
-
AcademicTerm
public AcademicTerm()Creates a new AcademicTerm with no initial values. Useful for frameworks that use reflection.
-
-
Method Details
-
getId
Returns the unique ID of this academic term.- Returns:
- the term ID
-
setId
Sets the unique ID of this academic term.- Parameters:
id- the term ID
-
getName
Returns the name of this academic term.- Returns:
- the term name
-
setName
Sets the name of this academic term.- Parameters:
name- the term name
-
getStartDate
Returns the start date of this academic term.- Returns:
- the start date
-
setStartDate
Sets the start date of this academic term.- Parameters:
startDate- the start date
-
getEndDate
Returns the end date of this academic term.- Returns:
- the end date
-
setEndDate
Sets the end date of this academic term.- Parameters:
endDate- the end date
-
toString
-
equals
-
hashCode
-