This repository has been archived on 2025-10-20. You can view files and clone it, but cannot push or open issues or pull requests.
Files
2bki21/progp/25-4-2 - oop/tnintern.php
2025-04-02 11:33:52 +02:00

26 lines
680 B
PHP

<?php
require_once 'teilnehmer.php';
ini_set("display_errors", "on");
class tnintern extends teilnehmer {
private string $abteilung;
private int $anzahl=0;
public function __construct($n, $vn, $c ,$abteilung) {
parent::__construct($vn, $n, $c);
$this->abteilung = $abteilung;
$this->anzahl= $this->anzahl+1;
}
public function getDaten() {
echo "Name: $this->name <br>";
echo "Vorname: $this->vorname <br>";
echo "Code: $this->code <br>";
echo "Abteilung: $this->abteilung <br>";
echo "Anzahl: $this->anzahl";
}
public function getAnzahl():int {
return $this->anzahl;
}
}
?>