% --- start of displayed preamble in the book ---
input metauml
% --- end of displayed preamble in the book ---
defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
Class.A("A")()(); Class.B("B")()();
B.sw=A.ne+(10,10);
drawObjects(A,B);
link(aggregationUni)
    (rpathManhattanX(A.e,B.s));
link(inheritance)
    (pathManhattanY(A.n,B.w));
endfig;
end;