49 lines
998 B
Java
49 lines
998 B
Java
|
|
||
|
import java.util.Date;
|
||
|
|
||
|
abstract class Benutzer {
|
||
|
private String name;
|
||
|
private String nachname;
|
||
|
private int kundennummer;
|
||
|
private Date date;
|
||
|
Benutzer(String name,String nachname,int kundennummer,Date date){
|
||
|
this.name=name;
|
||
|
this.nachname=nachname;
|
||
|
this.date=date;
|
||
|
this.kundennummer=kundennummer;
|
||
|
|
||
|
}
|
||
|
|
||
|
public String getNachname() {
|
||
|
return nachname;
|
||
|
}
|
||
|
|
||
|
public String getName() {
|
||
|
return name;
|
||
|
}
|
||
|
|
||
|
public Date getDate() {
|
||
|
return date;
|
||
|
}
|
||
|
|
||
|
public int getKundennummer() {
|
||
|
return kundennummer;
|
||
|
}
|
||
|
public static class Erwachsen extends Benutzer{
|
||
|
Erwachsen(String name,String nachname,int kundennummer,Date date){
|
||
|
super(name,nachname,kundennummer,date);
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
public static class Kinder extends Benutzer{
|
||
|
Kinder(String name,String nachname,int kundennummer,Date date){
|
||
|
super(name,nachname,kundennummer,date);
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|