In the Design Decisions subsection under "How does the base class get the state that it needs", it is suggested to use two stage initialization. It would be beneficial to point out that one need not create a factory method for each subclass. One could simply create a single template function returning a SuperPower*, enabling you to have a single function to create every SuperPower.
In the Design Decisions subsection under "How does the base class get the state that it needs", it is suggested to use two stage initialization. It would be beneficial to point out that one need not create a factory method for each subclass. One could simply create a single template function returning a SuperPower*, enabling you to have a single function to create every SuperPower.