diff --git a/progp/25-2-19/lehrerclass.php b/progp/25-2-19/lehrerclass.php new file mode 100644 index 0000000..d9c1764 --- /dev/null +++ b/progp/25-2-19/lehrerclass.php @@ -0,0 +1,49 @@ +setVorname($vn); + $this->setNachname($nn); + $this->setGehaltsstufe($gs); + } + + // Öffentliche Methoden + // Setter + private function setVorname(string $vn):void{ + $this->vorname = $vn; + } + + private function setNachname(string $nn):void{ + $this->nachname = $nn; + } + private function setGehaltsstufe(int $gs):void{ + $this->gehaltsstufe = $gs; + } + + // Getter + private function getVorname():string{ + return $this->vorname; + } + + private function getNachname():string{ + return $this->nachname; + } + private function getGehaltsstufe():int{ + return $this->gehaltsstufe; + } + + public function ausgeben():void{ + echo "

Lehrer: $this->vorname


"; + echo "

Lehrer: $this->nachname


"; + echo "

Gehaltsstufe: $this->gehaltsstufe


"; + } + + +} + +?> \ No newline at end of file