30 lines
623 B
Text
30 lines
623 B
Text
|
input metauml;
|
||
|
beginfig(1);
|
||
|
% Klassen
|
||
|
Class.Sensor("Sensor")
|
||
|
()
|
||
|
("+wert()");
|
||
|
|
||
|
Class.Licht("Lichtsensor")()();
|
||
|
Class.Beschl("Beschleunigungssensor")("<<constructor>> Beschleunigungssensor(achse)")();
|
||
|
Class.Lage("Lagesensor")()();
|
||
|
|
||
|
% Modul
|
||
|
Package.Sensoren("Sensoren")(Sensor, Lage, Beschl, Licht);
|
||
|
|
||
|
% Objekte anordnen
|
||
|
topToBottom(20)(Sensor, Beschl);
|
||
|
leftToRight(20)(Lage, Beschl, Licht);
|
||
|
|
||
|
% Objekte zeichnen
|
||
|
drawObjects(Sensor, Lage, Beschl, Licht, Sensoren);
|
||
|
|
||
|
% Assoziatonen
|
||
|
clink(realization)(Licht, Sensor);
|
||
|
clink(realization)(Lage, Sensor);
|
||
|
clink(realization)(Beschl, Sensor);
|
||
|
|
||
|
endfig;
|
||
|
end
|
||
|
|