Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Freemagazine Issue9 Visitor Design Pattern

Related Tutorials


 
 

Share on Google+Share on Google+

Visitor Design Pattern

Advertisement
The design pattern provides additional functionality to a class. The Visitor pattern allows us to create an external class to act on data in other classes.

Visitor Design Pattern

       

  1. Visitor Design Pattern
    The design pattern provides additional functionality to a class. The Visitor pattern allows us to create an external class to act on data in other classes. This is useful in those conditions if a fair number of instances are available of small number of classes and we have to perform some operations on all or on most of those classes.

    Lets take an example that demonstrates that how the classes implement the Visitor interface. In the following example we are taking the two interfaces one is Visitor interface and the other is Colddrink interface and then we implement to these interfaces into our classes.

Read more at:

http://www.javajazzup.com/issue9/page38.shtml

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: October 11, 2010

Related Tutorials

Discuss: Visitor Design Pattern  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com