From fecdf379afeca0140051d74ee9a55eb752e160bc Mon Sep 17 00:00:00 2001 From: janik Date: Mon, 15 Nov 2021 15:13:17 +0100 Subject: [PATCH] simplified --- 12fi5/AEuP/Konto/konto.ps1 | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/12fi5/AEuP/Konto/konto.ps1 b/12fi5/AEuP/Konto/konto.ps1 index f3fc2cf..cd53f1f 100644 --- a/12fi5/AEuP/Konto/konto.ps1 +++ b/12fi5/AEuP/Konto/konto.ps1 @@ -20,17 +20,7 @@ class konto { } ueberweissen([konto]$nach, [double]$menge) { - $stand_von = $this.guthaben - $stand_nach = $nach.guthaben - try { - $this.auszahlen($menge) - $nach.einzahlen($menge) - } - catch { - $this.guthaben = $stand_von - $nach.guthaben = $stand_nach - throw $_ - } + [konto]::ueberweissen($this, $nach, $menge) } konto() {