Class TeachingUnitResult
java.lang.Object
TeachingUnitResult
A result corresponding to a grade associated with a teaching unit.
-
Constructor Summary
ConstructorsConstructorDescriptionTeachingUnitResult(String teachingUnitName, Grade grade) Constructs an instance of TeachingUnitResult with a grade equals to the specifiedgradeand a teaching unit name equals to the specifiedteachingUnitName. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines whether or not two results are equal.getGrade()Returns the grade associated to the result.inthashCode()Returns a hash code value for the object.toString()Returns a string representation of the result in the format Name of the teaching unit : X.X.
-
Constructor Details
-
TeachingUnitResult
Constructs an instance of TeachingUnitResult with a grade equals to the specifiedgradeand a teaching unit name equals to the specifiedteachingUnitName.- Parameters:
teachingUnitName- the name of the teaching unit of the constructed TeachingUnitResultgrade- the grade of the constructed TeachingUnitResult
-
-
Method Details
-
getGrade
Returns the grade associated to the result.- Returns:
- the grade associated to the result
-
toString
Returns a string representation of the result in the format Name of the teaching unit : X.X. -
equals
Determines whether or not two results are equal. Two instances of TeachingUnitResult are equal if the values of theirteachingUnitNameandgrademember fields are the same. -
hashCode
public int hashCode()Returns a hash code value for the object.
-