Browse Source

alle tests grün

featureNotensammlung
Christian Baltzer 6 years ago
parent
commit
f36108bc3c
  1. 11
      src/main/java/ugsbo/com/notenSpeicher/Auswertung.java
  2. 15
      src/main/java/ugsbo/com/notenSpeicher/NotenKette.java

11
src/main/java/ugsbo/com/notenSpeicher/Auswertung.java

@ -3,8 +3,13 @@ package ugsbo.com.notenSpeicher;
public class Auswertung {
public static void main(String[] args) {
// TODO Auto-generated method stub
NotenKette Work = new NotenKette("Prog 1", 1);
Work.add("Prog 2", 2);
Work.add("Wi", 3);
System.out.println(Work.durchschnitt() + "\n");
System.out.print(Work.toString());
}
}
}

15
src/main/java/ugsbo/com/notenSpeicher/NotenKette.java

@ -19,5 +19,20 @@ public class NotenKette {
Workingobjekt = newWorkingObjekt;
}
public String toString() {
String erg = "";
Noten temp = Workingobjekt;
while (true) {
erg += temp.getFach() + "\t"+ temp.getNote() +"\n";
temp = temp.getVorher();
if (temp == null) {
return erg;
}
}
}
}
Loading…
Cancel
Save