The site has posted the next in their " " series of tutorials today. In this latest post they cover the Factory design pattern.

[The design pattern provides] an interface for creating families of related or dependent objects without specifying their concrete classes.

They use the same fictional business as in the previous articles to put the pattern in a more "real " situation. The goal is to create several "toy factories" that can "toy" objects based on certain requirements: either cars or helicopters. The post starts with the creation of an factory class and shows the concrete implementations of one for each type of toy. These concrete classes include basic properties about the toy and functionality to out the basics (ex: a car has four wheels, a helicopter has rotors).

Source link
thanks you RSS link


Please enter your comment!
Please enter your name here