Benutzer:Bam/UML-Klassendiagramm zum Möbelplaner: Unterschied zwischen den Versionen
Aus KGS-Wiki
Bam (Diskussion | Beiträge) (DIe EVA gemacht I guess, hat wahrscheinlich noch Änderungsbedarf) |
Sn (Diskussion | Beiträge) K (Feini fein :3) |
||
(2 dazwischenliegende Versionen von einem anderen Benutzer werden nicht angezeigt) | |||
Zeile 2: | Zeile 2: | ||
<uml> | <uml> | ||
@startuml | @startuml | ||
header Klasendiagramm: | header Klasendiagramm: Philosophenproblem | ||
footer: pls help what is this | footer: pls help what is this, also I don't have my Moebelplaner file at home so here's the Philosopher | ||
class Main { | class Main { | ||
-{static} main( | -{static} main(args: String[]) | ||
} | } | ||
class Chopstick { | class Chopstick { | ||
Zeile 15: | Zeile 15: | ||
} | } | ||
class Philosopher extends Thread { | class Philosopher extends Thread { | ||
+Philosopher( | -name: String | ||
-left: Chopstick | |||
-right: Chopstick | |||
+Philosopher(name: String, left: Chopstick, right: Chopstick) | |||
+run() | +run() | ||
+think() | +think() | ||
+grab( | +grab(stick: Chopstick) | ||
+eat() | +eat() | ||
+release( | +release(stick: Chopstick) | ||
+ | +toString(): String | ||
} | } | ||
Chopstick "1" <-- "*" Main | Chopstick "1" <-- "*" Main | ||
Philosopher "1" <-- "*" Main | Philosopher "1" <-- "*" Main | ||
Chopstick " | Chopstick "2" <-- "1" Philosopher | ||
@enduml | @enduml | ||
</uml> | </uml> |