Class AcademicTerm

java.lang.Object
edu.pdx.cs.joy.jdbc.AcademicTerm

public class AcademicTerm extends Object
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 Details

    • AcademicTerm

      public AcademicTerm(String name, LocalDate startDate, LocalDate endDate)
      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 term
      endDate - the end date of the term
    • AcademicTerm

      public AcademicTerm(int id, String name, LocalDate startDate, LocalDate endDate)
      Creates a new AcademicTerm with the specified ID, name, start date, and end date.
      Parameters:
      id - the unique identifier for the term
      name - the name of the term (e.g., "Fall 2024")
      startDate - the start date of the term
      endDate - 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

      public int getId()
      Returns the unique ID of this academic term.
      Returns:
      the term ID
    • setId

      public void setId(int id)
      Sets the unique ID of this academic term.
      Parameters:
      id - the term ID
    • getName

      public String getName()
      Returns the name of this academic term.
      Returns:
      the term name
    • setName

      public void setName(String name)
      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

      public void setStartDate(LocalDate startDate)
      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

      public void setEndDate(LocalDate endDate)
      Sets the end date of this academic term.
      Parameters:
      endDate - the end date
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object