@ -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());
}
@ -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;