Abstract factory pattern provide concept of factory of factories. Abstract design pattern is on of the creational design pattern that provide us the interface of creating related or independent objects without specifying the concrete classes and their specifications. In other words, Abstract design pattern is the way of organizing, How we can create groups of things that are related to each other. Think of it, like factory of factories. Let walk through the practical example of car production system using abstract factory design pattern for getting better understanding. Scenario: we are building card of two different types , ElectricCars and PetrolCars. Each car have different types of 1) Engine 2)Tyres Goals: Using abstract design pattern we have to create families of Electric and Petrol car parts. What types of classes will be use in this design pattern. 1) Abstract Products (Interface). 2) Concrete Products: These are concrete classes which implement Abstract Produ...
Comments
Post a Comment