访问者模
2020-06-14 13:12:32 2 举报
访问者模式
作者其他创作
大纲/内容
ComputerPartDisplayVisitor
+ visit(computer):void+ visit(mouse):void+ visit(keyboard):void+ visit(monitor):void
ComputerPart
+ accept(computerPartVisitor:ComputerPartVisitor):void
Monitor
+accept(computerPartVisitor:ComputerPartVisitor)
Computer
- parts:ComputerPart[]
+ Computer()+accept(computerPartVisitor:ComputerPartVisitor)
Keyboard
ComputerPartVisitor
Mouse
0 条评论
下一页