daily pastebin goal
14%
SHARE
TWEET

Untitled

a guest Dec 14th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Angestellter extends Person {
  2.     private double gehalt;
  3.     private String abteilung;
  4.  
  5.     public Angestellter(String name, String vorname) {
  6.         super(name, vorname);
  7.     }
  8.  
  9.     public double getGehalt() {
  10.         return gehalt;
  11.     }
  12.  
  13.     public boolean hatUrlaub() {
  14.         return true;
  15.     }
  16.  
  17.     public void setAbteilung(String bezeichnung) {
  18.         this.abteilung = bezeichnung;
  19.     }
  20.  
  21.     public void drucken() {
  22.         System.out.print(
  23.             super.vorname + " " + getName() + "\n"
  24.             + "E-Mail-Adresse: " + super.email + "\n"
  25.             + "arbeitet in Abteilung " + abteilung + ".\n"
  26.         );
  27.     }
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top