digraph G {
    /*全局设定*/
    graph [label=".dot图例-UML展示样例",
        labeljust="l",labelloc="t",
        fontsize=12.0,
        center=1,
        ranksep=0.2,
        ratio=compress,size="8,8",
        rankdir=LR,
        ];
    node[fontsize=10.0,
        height=0.1,
        style=filled,
        fillcolor=snow,
        color=darkolivegreen,
        fontcolor=darkolivegreen,
        shape = record,];
    edge [fontsize=9.0,
        fontcolor=yellowgreen,
        color=gray30,
        ];

    /*图元声明*/
    cofeshop    [label="<f0> 咖啡店 | <f1> name \n local | <f2> open() \n close()",];
    master      [label="<f0> 店长 | <f1> annual_pay | <f2> do_open() \n do_close()",];
    shopboy     [label="<f0> 店员 | <f1> name \n month_pay | <f2> changeName() \n ChangePay()",];
    cashman     [label="<f0> 收银员 | <f1>  | <f2> chk_cash()",];
    waiter      [label="<f0> 招待 | <f1> | <f2> makeCofe() \n sendCofe() \n cleanDesk()",];
    /*图例关系*/
    master:f0->cofeshop:f0    [label="1*1",arrowhead=onormal];
    shopboy:f0->cofeshop:f0   [label="n*1",arrowhead=onormal];
    cashman:f0->shopboy:f0    [label="n*1",arrowhead=onormal];
    waiter:f0->shopboy:f0     [label="n*1",arrowhead=onormal];

}