2024-01-23 15:39:49 +00:00
|
|
|
class Manager extends LeitenderAngestellter {
|
|
|
|
Dienstwagen dienstwagen;
|
|
|
|
|
2024-01-23 16:05:47 +00:00
|
|
|
public Manager(int personalNummer, String name, String vorname, double gehalt, double bonus){
|
|
|
|
super(personalNummer, name, vorname, gehalt, bonus);
|
|
|
|
}
|
|
|
|
|
2024-01-23 15:39:49 +00:00
|
|
|
void print() {
|
|
|
|
super.print();
|
|
|
|
|
|
|
|
if(dienstwagen != null) {
|
|
|
|
dienstwagen.print();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Dienstwagen {
|
|
|
|
String kennzeichen;
|
|
|
|
String wagentyp;
|
|
|
|
|
|
|
|
void print() {
|
|
|
|
System.out.println("Kennzeichen: " + kennzeichen);
|
|
|
|
System.out.println("Wagentyp: " + wagentyp);
|
|
|
|
}
|
|
|
|
}
|