A simple Factory Pattern example: The first example, one that I created in class, July 1, is the "BigDog, LittleDog" example. Here is the source code and here is the Javadoc. (Look on one of the pages for an image.) Based on Chapter 3 of the text.
Example of the Abstract Factory Pattern: This is quite a simple example. Study the CloneTest source to see what parts of the behavior are being probed. Then compile and run the test to see it in action. Here is the source code. I did not generate Javadoc for this example. Based on Chapter 5 of the text.
Example of the Prototype Pattern: This is reasonably simple example. Study the CloneTest source to see what parts of the behavior are being probed. In the source for ToCLone you can see that I've implemented three different clone methods, simpleCloneMe(), fancyCloneMe() and goryCloneMe(). You'll need to study these to see how they differ, in rough correspondence with their names. As before, you should compile the files and run the test to see it in action. Here is the source code. I did not generate Javadoc for this example either. Based on Chapter 8 of the text.