.
(d) The visitor was ?
from one class to another.
Answers
Answered by
0
ANSWER:-
Instead of calling visit(element) directly, Visitor asks the element to call its visit method. It contradicts the declared idea of class unawareness about visitors.
PS1 Please explain with your own words or point to exact explanation. Because two responses I got refer to something general and uncertain.
EXPLANATION:-
PS3 Scala's Pattern Matching = Visitor Pattern on Steroid shows how much simpler the Visitor pattern is without the accept method. Wikipedia adds to this statement: by linking a paper showing "that accept() methods are unnecessary when reflection is available; introduces term 'Walkabout' for the technique."
Similar questions