Voll Upload SGD Fachinformatiker PHP
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
class Person
|
||||
{
|
||||
protected string $name;
|
||||
protected string $vorname;
|
||||
|
||||
|
||||
public function __construct(string $nname, string $vname)
|
||||
{
|
||||
$this->name = $nname;
|
||||
$this->vorname = $vname;
|
||||
}
|
||||
|
||||
public function setName(string $nname):void
|
||||
{
|
||||
$this->name = $nname;
|
||||
}
|
||||
|
||||
public function getName():string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setVorname(string $vname):void
|
||||
{
|
||||
$this->vorname = $vname;
|
||||
}
|
||||
|
||||
public function getVorname():string
|
||||
{
|
||||
return $this->vorname;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Mitarbeiter extends Person
|
||||
{
|
||||
private int $gruppierung = 0;
|
||||
private int $steuerklasse = 0;
|
||||
private string $kontonummer = "0";
|
||||
|
||||
}
|
||||
|
||||
|
||||
class Kunde extends Person
|
||||
{
|
||||
private int $bonitaet = 0;
|
||||
|
||||
public function setBonitaet(int $boni): void
|
||||
{
|
||||
$this->bonitaet = $boni;
|
||||
}
|
||||
|
||||
public function getBonitaet():int
|
||||
{
|
||||
return $this->bonitaet;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user