Notify your Recitation TA once you have completed this recitation such that they may verify your work.
In this recitation you will implement the factory pattern for a familiar class of object, but from scratch.
For this recitation, you will only need your IDE.
draw()with return type
draw()method in these classes don't have to actually draw or render anything. A simple print statement saying something like, "Drawing a rectangle now." is sufficient.
enumshould contain all the concrete shape classes.
mainmethod. Within this main method, create an instance of the factory class, and use that to in turn create a rectangle, a circle, and a square. Invoke the
draw()method on each concrete instance to verify that the real type is correct.
When you are done, show your work to the TAs. The TAs will verify your work against the solution provided to them separately.