Select Git revision
ArrayGridTest.java
Forked from
TRAVERS Corentin / flooding-template
Source project has a limited visibility.
-
RAKOTOARISOA Andrianinarisaina cy authored
Tâche 2 : Ajout de la méthode "void color(ColorGenerator colorGenerator)" dans l'interface Grid et son implémentation dans la classe ArrayGrid / Ajout de la classe UniformColorGenerator qui implémente l’interface ColorInterface et implémentation de la méthode "Color nextColor(Cell cell)" dans la classe UniformColorGenerator / Ajout de la méthode testColor dans la classe ArrayGridTest
RAKOTOARISOA Andrianinarisaina cy authoredTâche 2 : Ajout de la méthode "void color(ColorGenerator colorGenerator)" dans l'interface Grid et son implémentation dans la classe ArrayGrid / Ajout de la classe UniformColorGenerator qui implémente l’interface ColorInterface et implémentation de la méthode "Color nextColor(Cell cell)" dans la classe UniformColorGenerator / Ajout de la méthode testColor dans la classe ArrayGridTest
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
TeachingUnitResult.java 1.21 KiB
/**
* A result corresponding to a grade associated with a teaching unit.
*/
public class TeachingUnitResult {
private final String teachingUnitName;
private final Grade grade;
/**
* Constructs an instance of TeachingUnitResult with a grade equals to the specified {@code grade}
* and a teaching unit name equals to the specified {@code teachingUnitName}.
*
* @param teachingUnitName the name of the teaching unit of the constructed TeachingUnitResult
* @param grade the grade of the constructed TeachingUnitResult
*/
public TeachingUnitResult(String teachingUnitName, Grade grade) {
this.teachingUnitName = teachingUnitName;
this.grade = grade;
}
/**
* Returns the grade associated to the result.
*
* @return the grade associated to the result
*/
public Grade getGrade() {
return this.grade;
}
/**
* Returns a string representation of the result in the format Name of the teaching unit : X.X.
* @return a string representation of the result
*/
@Override
public String toString() {
return this.teachingUnitName;
}
public boolean equals(Grade grade){
if (this.grade.getValue() == grade.getValue()){
return true;
}
return false;
}
}