From the course: C++ Design Patterns: Creational
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Abstract Factory pattern implementation - Visual Studio Express Tutorial
From the course: C++ Design Patterns: Creational
Abstract Factory pattern implementation
- [Instructor] The AbstractFactory's designs goal is to have different concrete factories creating similar objects. But the exact construction of the objects are defined differently by each factory, which allows objects that belong in the same suite or family to be kept together. For this implementation, I'm going to create two car factories, one for a gas powered car, and one for an electric car. The gas powered car factory will have its own implementation of a car door and its own gas powered engine. And the electric car factory will have its own implementation of a car door and its own electric engine. To help us get started, I'll have created these products ahead of time; the doors and the engines. And we'll focus on creating the factories for this example. I've opened 04_02_AbFacImp_Start. We have already implemented my base door class at line 10. It has a public method cut open that will be overrided by the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Abstract Factory concept4m 50s
-
(Locked)
Abstract Factory pattern implementation6m 3s
-
(Locked)
Using the Abstract Factory4m 14s
-
(Locked)
Running the Abstract Factory3m 35s
-
(Locked)
Extending the Abstract Factory2m 47s
-
(Locked)
Challenge: Abstract Factory4m 1s
-
(Locked)
Solution: Abstract Factory9m
-
-
-
-
-