• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Some of the missing code from The Design Patterns Java Companion

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The abovementioned book (now titled: "Java Design Patterns: A Tutorial" by James W. Cooper), did not have the code for the Factory pattern (amongst others) included on the website for this older edition.
Since I went through the trouble of inputting the code, I figured I would share it with the fellow ranchers in case they want to save themselves some time and just cut and paste what I've got.





I got lazy and didn't include the comments, nor did I use Swing, but it should still save you some time. Also, I did include additional println stmts to follow the flow of the programs if you are a beginner like myself.
Happy Pattern learning!
Janet
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for sharing, Janet!
 
reply
    Bookmark Topic Watch Topic
  • New Topic