From 4320d480bce0e1eb23f7e1095b064f41b77aeb83 Mon Sep 17 00:00:00 2001 From: mantaru Date: Mon, 28 Oct 2024 17:05:55 +0100 Subject: [PATCH] add files --- aufgabe3/schleuse.lsim | Bin 0 -> 4270 bytes aufgabe4/klassenmodell.class.violet.html | 523 +++++++++++++++++++++++ aufgabe4/main.py | 32 ++ 3 files changed, 555 insertions(+) create mode 100644 aufgabe3/schleuse.lsim create mode 100644 aufgabe4/klassenmodell.class.violet.html create mode 100644 aufgabe4/main.py diff --git a/aufgabe3/schleuse.lsim b/aufgabe3/schleuse.lsim new file mode 100644 index 0000000000000000000000000000000000000000..be9569eaee8c4664b04399553907c9d2dfc64efb GIT binary patch literal 4270 zcmd5%0Ic?o+ws+g^?XG*@ zC3_SlisFM0^{EA^NFNj*ghKJbNMO83UccLwiHk5 z^ZHOjSoYA%rXgH^B=B&1p4bIq7bN?qb8nOvM=mNE$Y?NN=$>v^qNzECZ`MplXt2?= z`L8jz;fONywWi~`&;@KQOFg#kRE7@EoqW71yEA#*fcN$LAhEm(V$ERvh7981q`}vj+9|TASKDjKAbjVQwA;TVXh#)FMRdduKAmnJ_%DJ zix5pBy^VC10APIZY+zG%1= z60uSape`giRxwtDz#i1HBQKYFaCeJ-6e*+LhrWgZt#&Gi=K^70~`(+#d#! z41NG~PCNOGoWmR4qjN%zqJUHII^Z3;2 zHC)^EkGm&M2*|geF=NEVH(^g}nO}y@P6?^pMAzxHhbR9BxbL{}DOHRv>Ew}snu0*Y zWA&iM_JqDB`a`HR{Ce_b8sI#ZnCc?VFH>TjUJj|0)hpTANbh@$SI6?%* + + + + + + + + This file was generated with Violet UML Editor 3.0.0. +   ( View Source / Download Violet ) +
+
+ +
+
+ embedded diagram image + + \ No newline at end of file diff --git a/aufgabe4/main.py b/aufgabe4/main.py new file mode 100644 index 0000000..e73dd0d --- /dev/null +++ b/aufgabe4/main.py @@ -0,0 +1,32 @@ +from abc import ABC, abstractmethod + +class Fahrgast: + def __init__(self, k_name, email): + self.k_name = k_name + self.email = email + +class Mitfahrer: + def __init__(self, mitf_name, mitf_vorname, mitf_sitz_reservier): + self.mitf_name = mitf_name + self.mitf_vorname = mitf_vorname + self.mitf_sitz_reservier = mitf_sitz_reservier + +class Fahrschein(ABC): + def __init__(self, fg: Fahrgast, start_dat, end_dat, kinderanz, von_ort, bis_ort, rueckfahrt, sitz_reserv): + self.fg = fg + self.start_dat = start_dat + self.end_dat = end_dat + self.kinderanz = kinderanz + self.von_ort = von_ort + self.bis_ort = bis_ort + self.rueckfahrt = rueckfahrt + self.sitz_reserv = sitz_reserv + + @abstractmethod + def berechne_fahrpreis(self): + pass + +class Einzelfahrschein(Fahrschein): + def berechne_fahrpreis(self): + return 100 +