免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Visitor
“
- [Presenter] The visitor design pattern allows adding new features to an existing class hierarchy without changing it. It's sometimes necessary to add new operations dynamically to existing classes with minimal changes. For our scenario, we present a House class. Visitors in this scenario include an HVAC specialist and an electrician. The HVAC specialist in our scenario is visitor type one, and the electrician is visitor type two. The visitor pattern represents new operations to be performed on the various elements of an existing class hierarchy. Visitors can also provide operations on a composite object.
内容
-
-
-
-
-
-
(已锁定)
Observer1 分钟 5 秒
-
(已锁定)
Observer example6 分钟 22 秒
-
(已锁定)
Solution: Observer2 分钟 4 秒
-
(已锁定)
Visitor56 秒
-
(已锁定)
Visitor Example6 分钟 42 秒
-
(已锁定)
Iterator1 分钟 15 秒
-
(已锁定)
Iterator example4 分钟 32 秒
-
(已锁定)
Strategy40 秒
-
(已锁定)
Strategy Example5 分钟 44 秒
-
(已锁定)
Solution: Strategy4 分钟 16 秒
-
(已锁定)
Chain of Responsibility40 秒
-
(已锁定)
Chain of Responsibility example5 分钟 57 秒
-
(已锁定)
-
-