removed old solution
This commit is contained in:
parent
dbca5fe6dd
commit
7b69a0c9dc
@ -1,16 +0,0 @@
|
||||
class Angestellter extends Mitarbeiter {
|
||||
|
||||
double monatsGehalt;
|
||||
|
||||
public Angestellter(int personalNummer, String name, String vorname, double monatsGehalt) {
|
||||
super(personalNummer, name, vorname);
|
||||
this.monatsGehalt = monatsGehalt;
|
||||
}
|
||||
|
||||
void print(){
|
||||
System.out.println(getPersonalNummer());
|
||||
System.out.println(getName());
|
||||
System.out.println(getVorname());
|
||||
System.out.println(monatsGehalt);
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
class Arbeiter extends Mitarbeiter{
|
||||
|
||||
double stundenSatz;
|
||||
|
||||
Arbeiter(int personalNummer, String name, String vorname, double stundenSatz) {
|
||||
super(personalNummer, name, vorname);
|
||||
this.stundenSatz = stundenSatz;
|
||||
}
|
||||
|
||||
void print(){
|
||||
System.out.println(getPersonalNummer());
|
||||
System.out.println(getName());
|
||||
System.out.println(getVorname());
|
||||
System.out.println(stundenSatz);
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
class Aufgabe {
|
||||
public static void main(String[] args) {
|
||||
Manager person = new Manager(1, "Wurst", "Hans", 100, 1000);
|
||||
person.print();
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
final class Facharbeiter extends Arbeiter{
|
||||
|
||||
String fachRichtung;
|
||||
|
||||
Facharbeiter(int personalNummer, String name, String vorname, double stundensatz, String fachRichtung) {
|
||||
super(personalNummer, name, vorname, stundensatz);
|
||||
this.fachRichtung = fachRichtung;
|
||||
}
|
||||
|
||||
void print(){
|
||||
System.out.println(getPersonalNummer());
|
||||
System.out.println(getName());
|
||||
System.out.println(getVorname());
|
||||
System.out.println(stundenSatz);
|
||||
System.out.println(fachRichtung);
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
public class LeitenderAngestellter extends Angestellter {
|
||||
double bonus;
|
||||
|
||||
LeitenderAngestellter(int personalNummer, String name, String vorname, double monatsGehalt, double bonus) {
|
||||
super(personalNummer, name, vorname, monatsGehalt);
|
||||
this.bonus = bonus;
|
||||
}
|
||||
|
||||
void print() {
|
||||
super.print();
|
||||
System.out.println("Bonus: " + bonus);
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
class Manager extends LeitenderAngestellter {
|
||||
Dienstwagen dienstwagen;
|
||||
|
||||
Manager(int personalNummer, String name, String vorname, double monatsGehalt, double bonus){
|
||||
super(personalNummer, name, vorname, monatsGehalt, bonus);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
abstract class Mitarbeiter{
|
||||
int personalNummer;
|
||||
String name;
|
||||
String vorname;
|
||||
|
||||
public Mitarbeiter(int personalNummer, String name, String vorname) {
|
||||
this.personalNummer = personalNummer;
|
||||
this.name = name;
|
||||
this.vorname = vorname;
|
||||
}
|
||||
|
||||
abstract void print();
|
||||
void setPersonalNummer(int i){personalNummer=i;}
|
||||
void setName(String s){name=s;}
|
||||
void setVorname(String s){vorname=s;}
|
||||
|
||||
int getPersonalNummer(){return personalNummer;}
|
||||
String getName(){return name;}
|
||||
String getVorname(){return vorname;}
|
||||
}
|
Loading…
Reference in New Issue
Block a user