fixed order of parameters
This commit is contained in:
parent
90954ad137
commit
f30fe63db7
@ -1,11 +1,16 @@
|
||||
class Arbeiter extends Mitarbeiter{
|
||||
|
||||
double stundenSatz;
|
||||
double stundenSatz;
|
||||
|
||||
void print(){
|
||||
System.out.println(getPersonalNummer());
|
||||
System.out.println(getName());
|
||||
System.out.println(getVorname());
|
||||
System.out.println(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,12 +1,17 @@
|
||||
final class Facharbeiter extends Arbeiter{
|
||||
|
||||
String fachRichtung;
|
||||
String fachRichtung;
|
||||
|
||||
void print(){
|
||||
System.out.println(getPersonalNummer());
|
||||
System.out.println(getName());
|
||||
System.out.println(getVorname());
|
||||
System.out.println(stundenSatz);
|
||||
System.out.println(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,7 +1,7 @@
|
||||
public class LeitenderAngestellter extends Angestellter {
|
||||
double bonus;
|
||||
|
||||
public LeitenderAngestellter(int personalNummer, String name, String vorname, double monatsGehalt, double bonus) {
|
||||
LeitenderAngestellter(int personalNummer, String name, String vorname, double monatsGehalt, double bonus) {
|
||||
super(personalNummer, name, vorname, monatsGehalt);
|
||||
this.bonus = bonus;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
class Manager extends LeitenderAngestellter {
|
||||
Dienstwagen dienstwagen;
|
||||
|
||||
public Manager(int personalNummer, String name, String vorname, double gehalt, double bonus){
|
||||
super(personalNummer, name, vorname, gehalt, bonus);
|
||||
Manager(int personalNummer, String name, String vorname, double monatsGehalt, double bonus){
|
||||
super(personalNummer, name, vorname, monatsGehalt, bonus);
|
||||
}
|
||||
|
||||
void print() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
abstract class Mitarbeiter{
|
||||
int personalNummer;
|
||||
String name;
|
||||
String vorname;
|
||||
int personalNummer;
|
||||
String name;
|
||||
String vorname;
|
||||
|
||||
public Mitarbeiter(int personalNummer, String name, String vorname) {
|
||||
this.personalNummer = personalNummer;
|
||||
@ -9,12 +9,12 @@ abstract class Mitarbeiter{
|
||||
this.vorname = vorname;
|
||||
}
|
||||
|
||||
abstract void print();
|
||||
void setPersonalNummer(int i){personalNummer=i;}
|
||||
void setName(String s){name=s;}
|
||||
void setVorname(String s){vorname=s;}
|
||||
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;}
|
||||
int getPersonalNummer(){return personalNummer;}
|
||||
String getName(){return name;}
|
||||
String getVorname(){return vorname;}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user