Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Angestellter extends Person {
- private double gehalt;
- private String abteilung;
- public Angestellter(String name, String vorname) {
- super(name, vorname);
- }
- public double getGehalt() {
- return gehalt;
- }
- public boolean hatUrlaub() {
- return true;
- }
- public void setAbteilung(String bezeichnung) {
- this.abteilung = bezeichnung;
- }
- public void drucken() {
- System.out.print(
- super.vorname + " " + getName() + "\n"
- + "E-Mail-Adresse: " + super.email + "\n"
- + "arbeitet in Abteilung " + abteilung + ".\n"
- );
- }
- }
Add Comment
Please, Sign In to add comment