免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Factory
“
- [Narrator] Factory encapsulates object creation. That is factory is an object specializing in creating other objects. The factory pattern is useful, especially when you're not sure about what type of objects you'll be needing eventually in your system. Another possibility is that your application needs to decide on what class to use at runtime. Here is a scenario we'll be using in our coding exercise. Your pet shop was only selling dogs, but now, you need to sell cats too. Therefore, your system needs to be able to handle cats as well as dogs. It's supposed to show how each of the pets you sell speaks.
内容
-
-
-
-
(已锁定)
Factory57 秒
-
Factory example7 分钟 37 秒
-
Solution: Factory2 分钟 37 秒
-
(已锁定)
Abstract Factory1 分钟 46 秒
-
(已锁定)
Abstract Factory example5 分钟 57 秒
-
(已锁定)
Singleton1 分钟 39 秒
-
Singleton example7 分钟 17 秒
-
(已锁定)
Solution: Singleton2 分钟 20 秒
-
(已锁定)
Builder2 分钟 3 秒
-
(已锁定)
Builder example5 分钟 59 秒
-
(已锁定)
Prototype1 分钟 30 秒
-
(已锁定)
Prototype example7 分钟 18 秒
-
(已锁定)
-
-
-
-