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