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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related A Practical In Depth Guide C++ Questions!