TDT4100/diagrammer/ex1/Rectangle.wsd

32 lines
605 B
Plaintext

@startuml Rectangle
skinparam DefaultFontName Fira Code
!definelong obj1(id, max, min)
object "~#1:Rectangle" as id
id : maxpoint = max
id : minpoint = min
!enddefinelong
!definelong obj2(id, max, min)
object "~#2:Rectangle" as id
id : maxpoint = max
id : minpoint = min
!enddefinelong
!define to(id1, id2, txt) id1 ..> id2 : txt
!define self(id, txt) id ..> id : "txt"
obj1(A, "[]", "[]")
obj1(B, "[1,2]", "[1,2]")
obj2(C, "[3,10]", "[-1,8]")
obj1(D, "[3,10]", "[-1,2]")
to(A,B,"add(1,2)")
self(B, "contains(1,2) => false")
to(B,D,"add(~#2)")
self(D, "contains(1,2) => true")
@enduml