Upgrade 5.12

master
david 2022-12-05 13:05:07 +01:00 committed by freverda
parent 85cc36c3c8
commit 1afd3661d7
3 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,7 @@ public class Datenbank
public Datenbank(int max){ public Datenbank(int max){
Studenten = new Student [max]; Studenten = new Student [max];
} }
//Konstruktor //Konstruktor
public String toString(){ public String toString(){
String result = ""; String result = "";

View File

@ -18,6 +18,7 @@ public class Student
Studiengang = g; Studiengang = g;
} }
//Methoden //Methoden
public String toString(){ public String toString(){
return Name + " ("+ Matrikelnummer + ") " + " studiert " +Studiengang; return Name + " ("+ Matrikelnummer + ") " + " studiert " +Studiengang;

View File

@ -14,6 +14,7 @@ public class StudentTest
db.addStudent(new Student("Klaus",24658,"Kunst")); db.addStudent(new Student("Klaus",24658,"Kunst"));
System.out.println(db); System.out.println(db);
} }
} }