kontonummer = $kn; $this->kontostand = $ks; $this->inhaber = $ki; echo "

Konto: " .$this->kontonummer ." wurde erfolgreich angelegt

"; echo "

Kontoinhaber: " .$this->inhaber ."

"; echo "

Kontostand: " .$this->kontostand ." Euro

"; echo "


"; } public function einzahlung(float $wert) { $this->kontostand = $this->kontostand + $wert; echo "

Der Betrag " .$wert ."€ wurde auf das Konto mit der Kontonummer " .$this->kontonummer ." eingezahlt.
"; echo "Neuer Kontostand beträgt: " .$this->kontostand ."€

"; echo "

"; } public function abheben(float $wert) { if ($this->kontostand - $wert >= 0) { $this->kontostand = $this->kontostand - $wert; echo "

Der Betrag " .$wert ."€ wurde vom Konto mit der Kontonummer " .$this->kontonummer ." ausgezahlt.
"; echo "Neuer Kontostand beträgt: " .$this->kontostand ."€

"; echo "

"; } else { echo "

Nicht genug Guthaben zum Auszahlen auf dem Konto " .$this->kontonummer ."

"; } } } ?>