diff --git a/Zweites Jahr/README.md b/Zweites Jahr/README.md index 169f4cc..6b0531b 100644 --- a/Zweites Jahr/README.md +++ b/Zweites Jahr/README.md @@ -4,6 +4,10 @@ ## Gemacht *Wir warscheinlich nie aktuell aber egaaaal* +### 20-11-25 - PHP + +- GETTER in PHP +- Übung zu OOP ### 19-11-25 - PHP diff --git a/Zweites Jahr/Rechteck.class.php b/Zweites Jahr/Rechteck.class.php new file mode 100755 index 0000000..c515fe1 --- /dev/null +++ b/Zweites Jahr/Rechteck.class.php @@ -0,0 +1,58 @@ +seiteA=$sA; + } + public function setSeiteB($sB) + { + $this->seiteB=$sB; + } + + public function setFarbe($f) + { + $this->farbe=$f; + } + + // GET-Methoden + + public function getSeiteA(): float + { + return $this->seiteA; + } + + public function getSeiteB(): float + { + return $this->seiteB; + } + + public function getFarbe(): string + { + return $this->farbe; + } + + // Andere Methoden + public function showFlaeche() + { + //$seiteA=$this-seiteA; + $ergebnis=$this->seiteA*$this->seiteB; + + echo "
{$this->seiteA} * {$this->seiteB} = {$ergebnis}
"; + } + +} + + + + + +?> \ No newline at end of file diff --git a/Zweites Jahr/TestRechteck.php b/Zweites Jahr/TestRechteck.php new file mode 100755 index 0000000..f984798 --- /dev/null +++ b/Zweites Jahr/TestRechteck.php @@ -0,0 +1,24 @@ +IBAN: $this->iban
"; + echo "Kontoinhaber: $this->kontoInhaber
"; + echo "Disporahmen: $this->dispoRahmen
"; + echo "Kontostand: $this->kontoStand
"; + } + +} + +?> \ No newline at end of file diff --git a/Zweites Jahr/uebung_konto/konto.php b/Zweites Jahr/uebung_konto/konto.php new file mode 100644 index 0000000..6422b78 --- /dev/null +++ b/Zweites Jahr/uebung_konto/konto.php @@ -0,0 +1,10 @@ +