Question: Using the solution from a previous exercise, augment your code as follows: 1. Implement the Factory Method pattern to create various shapes. You will have
Using the solution from a previous exercise, augment your code as follows:
1. Implement the Factory Method pattern to create various shapes. You will have already created an abstract base class of shape and derived classes such as Rectangle, Circle, Triangle, and possibly square.
2. Choose whether to implement your Factory Method as a static method in shape or as a method in a ShapeFactory class (introducing the latter class if necessary).
Step by Step Solution
3.32 Rating (149 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
