An Example/Tutorial of the Factory Design Method
A factory method is a static method of a class that returns an object of that class’s type. Unlike a constructor, the actual object it returns might be an instance of a subclass. It can return existing instances multiple times. The factory method is basically a “creator” design pattern in C++ for creating sub classes from a base type class.
Add A Comment
You must be logged in to post a comment.