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.*;
|
||||
|
||||
public class Pruefungsanmeldung {
|
||||
TreeSet<Student> anmeldung = new TreeSet<Student>();
|
||||
TreeSet<Integer> anmeldung = new TreeSet<Integer>();
|
||||
int matrikelnr;
|
||||
|
||||
public boolean anmelden(Student student) {
|
||||
if ((anmeldung.contains(student)))
|
||||
public boolean anmelden(int matrikelnr) {
|
||||
if ((anmeldung.contains(matrikelnr)))
|
||||
return false;
|
||||
else {
|
||||
anmeldung.add(student);
|
||||
anmeldung.add(matrikelnr);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class Student {
|
||||
|
||||
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;
|
||||
public class Prüfungen {
|
||||
String prüfungsmodul;
|
||||
|
||||
}
|
||||
|
||||
public static void main (String []args) {
|
||||
PrintStream cons=System.out;
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
Pruefungsanmeldung p1 = new Pruefungsanmeldung();
|
||||
System.out.println(p1.anmelden(12345));
|
||||
System.out.println(p1.anmelden(12045));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue