VL-Programmieren/VL06/Aufgabe01/Mitarbeiter.java

40 lines
758 B
Java
Raw Normal View History

2024-05-07 21:58:15 +00:00
package VL06.Aufgabe01;
abstract class Mitarbeiter {
protected int personalNummer;
protected String name;
protected String vorname;
Mitarbeiter(int personalNummer, String name, String vorname) {
this.personalNummer = personalNummer;
this.name = name;
this.vorname = vorname;
}
abstract void print();
public void setPersonalNummer(int personalNummer) {
this.personalNummer = personalNummer;
}
public void setName(String name) {
this.name = name;
}
public void setVorname(String vorname) {
this.vorname = vorname;
}
public int getPersonalNummer() {
return this.personalNummer;
}
public String getName() {
return this.name;
}
public String getVorname() {
return this.vorname;
}
}