Created
June 29, 2014 20:22
-
-
Save grauwoelfchen/ee60d59d219efe138c4d to your computer and use it in GitHub Desktop.
UML with MetaUML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input metauml; | |
beginfig(0); | |
% class | |
Class.Object("Object") | |
("+name : string") | |
(); | |
Class.Animal("Animal") | |
() | |
("#say_hi() : void"); | |
Class.Plant("Plant") | |
() | |
("#say_hello() : void"); | |
Class.Octopus("Octopus") | |
("+hands : integer") | |
("#sing() : void"); | |
Class.Dog("Dog") | |
("+tail : integer") | |
("#bark() : void"); | |
Class.Penguin("Penguin") | |
() | |
("+ play() : void"); | |
Class.Flower("Flower") | |
() | |
("+ roller_state() : void"); | |
Class.Egg("Egg") | |
("+brother : object") | |
("+ say_yes() : void"); | |
Class.Snowman("Snowman") | |
() | |
("+ walk() : void"); | |
% position | |
topToBottom(30)(Object, Plant); | |
leftToRight(20)(Animal, Plant, Egg, Snowman); | |
topToBottom(30)(Animal, Dog); | |
leftToRight(20)(Octopus, Dog, Penguin, Flower); | |
drawObjects( | |
Object, Animal, Plant, | |
Egg, Snowman, Octopus, Dog, Penguin, Flower | |
); | |
% connection | |
clink(inheritance)(Animal, Object); | |
clink(inheritance)(Plant, Object); | |
clink(inheritance)(Egg, Object); | |
clink(inheritance)(Snowman, Object); | |
clink(inheritance)(Octopus, Animal); | |
clink(inheritance)(Dog, Animal); | |
clink(inheritance)(Penguin, Animal); | |
clink(inheritance)(Flower, Plant); | |
endfig; | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment