diff --git a/bin/main/App.class b/bin/main/App.class index 0cb56f63e50a57d8d781f466cc93ff2a9b414b92..cd4c249671243a8e3abee930563b1706eb4ecafb 100644 Binary files a/bin/main/App.class and b/bin/main/App.class differ diff --git a/bin/main/Cohort.class b/bin/main/Cohort.class index f4e40289fb272795aea45cf7df748b268a8ca359..b711444dcd8420005b3b0d49848c0bb4c5fefead 100644 Binary files a/bin/main/Cohort.class and b/bin/main/Cohort.class differ diff --git a/src/main/java/App.java b/src/main/java/App.java index dbae42036ba800df12680da4cf5081e7f4117624..2a7b8c6c3509705628155f9717104abc31f70701 100644 --- a/src/main/java/App.java +++ b/src/main/java/App.java @@ -1,5 +1,10 @@ public class App { public static void main(String[] args){ - // TODO add code + Student toto = new Student("Toto", "Totoro"); + Grade toto_UEpro = new Grade(0.0); + Grade toto_Sport = new Grade(5.0); + toto.addResult("UE_pro", toto_UEpro); + toto.addResult("toto_Sport", toto_Sport); + toto.printResults(); } } diff --git a/src/main/java/Cohort.java b/src/main/java/Cohort.java index b997326978841098c0235774f90bd70fd6c389c1..5bd0257ba5a10e293860de1bd1000aad74423123 100644 --- a/src/main/java/Cohort.java +++ b/src/main/java/Cohort.java @@ -24,7 +24,7 @@ public class Cohort { * @param student the student to be added to the cohort */ public void addStudent(Student student){ - // TODO : add code + this.students.add(student); } /** @@ -32,8 +32,7 @@ public class Cohort { * @return the list of students of the cohort. */ public List<Student> getStudents(){ - // TODO : change code - return null; + return this.students; } /** @@ -50,7 +49,13 @@ public class Cohort { */ @Override public String toString() { - // TODO : change code + String textToReturn = ""; + System.out.println(this.name + "\n"); + for (Student student : this.students) { + System.out.println("\n"); + student.printResults(); + } + return null; } }