Prüfungsanmeldung
parent
bdadc3b88b
commit
537769b8fa
|
@ -0,0 +1,3 @@
|
||||||
|
Firmenname = "hjv"
|
||||||
|
Firmenadresse = "hv"
|
||||||
|
Bankverbindung ="ugv"
|
|
@ -4,35 +4,26 @@ import java.io.PrintStream;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class Pruefungsanmeldung {
|
public class Pruefungsanmeldung {
|
||||||
TreeSet<Student> anmeldung = new TreeSet<Student>();
|
TreeSet<Integer> anmeldung = new TreeSet<Integer>();
|
||||||
|
int matrikelnr;
|
||||||
|
|
||||||
public boolean anmelden(Student student) {
|
public boolean anmelden(int matrikelnr) {
|
||||||
if ((anmeldung.contains(student)))
|
if ((anmeldung.contains(matrikelnr)))
|
||||||
return false;
|
return false;
|
||||||
else {
|
else {
|
||||||
anmeldung.add(student);
|
anmeldung.add(matrikelnr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Student {
|
public class Prüfungen {
|
||||||
|
|
||||||
public Student(double mtrn, String nn, String vn, String pm) {
|
|
||||||
matrikelnr = mtrn;
|
|
||||||
nachname = nn;
|
|
||||||
vorname = vn;
|
|
||||||
prüfungsmodul = pm;
|
|
||||||
}
|
|
||||||
|
|
||||||
double matrikelnr;
|
|
||||||
String nachname;
|
|
||||||
String vorname;
|
|
||||||
String prüfungsmodul;
|
String prüfungsmodul;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main (String []args) {
|
public static void main(String[] args) {
|
||||||
PrintStream cons=System.out;
|
Pruefungsanmeldung p1 = new Pruefungsanmeldung();
|
||||||
|
System.out.println(p1.anmelden(12345));
|
||||||
|
System.out.println(p1.anmelden(12045));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue