1
vote
2answers
128 views

Validating objects with each other - Design Pattern needed

I am running a zoo application. My zoo includes an abstract class of 'animal', and several deriving classes - 'zebra', 'elephant', 'orangutan', 'baboon' and so on. Of each class I have several ...
1
vote
1answer
188 views

Visitor pattern [closed]

I was recently given the following task, and failed, the reason given that I misunderstood the question Create a 'LibraryItem' interface. Create 3 concrete implementations of LibraryItem: 'Book', ...
9
votes
1answer
976 views

Using visitor pattern with large object hierarchy

Context I've been using with a hierarchy of objects (an expression tree) a "pseudo" visitor pattern (pseudo, as in it does not use double dispatch) : public interface MyInterface { void ...
1
vote
2answers
733 views

Use of the Visitor pattern and possible over engineering

I am developing a small application in .NET and am thinking of using XML to save the object model. My first thought was to separate the model and the generation of XML by using the Visitor pattern. ...