In this problem set we're going to expand upon our Mario application by refactoring to use the Factory Design Pattern.
- First and foremost tag most recent commit and place all of your new changes on a branch.
- First, cleanup Mario.java. Refactor your code so that a Pyramid class encapsulates the core logic.
- Next, ensure that your Printer interface only accepts Pyramids. Use "toString" on the pyramid as described in this video).
- Finally, implement the Factory Design Pattern to hide the instantiation of the Pyramid objects here's how video.
Head First Design Patterns that does a great job of explaing how this pattern works and is implemented.
You can get Head First Design Patterns in print on Amazon
Or you can get it as an ebook with a free trial of Safari Books
Email me at my email address on my profile page when your homework is complete.