软件设计模式课件 Lect7-Visitor--Behavioral.pptVIP

  • 4
  • 0
  • 约1.76万字
  • 约 49页
  • 2020-11-10 发布于四川
  • 举报

软件设计模式课件 Lect7-Visitor--Behavioral.ppt

* 关于CompositeStructure: 在CompositeStructure类中,封装了长度可以弹性增长的数据结构ArrayList。 在CompositeStructure对象中,可以添加许多等待访问的对象,而不必关心数组越界问题。 类CompositeStructure负责“批量”接受访问者访问所需要被访问的对象。 计算机部件销售的例子 * ComputerPartsGUI ComputerPart +getPrice() +getDescription() +accept(Visitor v) Memory Motherboard Microprocessor Monitor VideoCard +getPrice() +getDescription() +accept(Visitor v) +getPrice() +getDescription() +accept(Visitor v) +getPrice() +getDescription() +accept(Visitor v) +getPrice() +getDescription() +accept(Visitor v) +getPrice() +getDescription() +accept(Visitor v) 访问者模式设计的程序的典型交互 计算机部件销售的例子 CompositeStructure

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档