Access to the learner model. Can start from the following aspects.
- Suppose a programming language supports double dispatch (multiple dispatch). There is not much value in the interview model. In fact, after reading the Java simulation Double-Dispatch, you should do your own final title: Change the above code. Makes the message A.foo (b), where a is declared as an X-type variable, and B is declared as a Z-type variable. When the topic is done, the interview pattern is yours.
So...... To play tricks on the basis of the interview pattern, we'll continue.
- The intent of the interview mode facilitates the addition of new interfaces to a class .
- Why should gof mention " some kind of object structure " and elements ? A lot of examples on the web, the interview mode, do not make a list to think that they are very unprofessional. In fact, there is no relationship between the data structure and the dime.
Learn the interview pattern. It is not recommended that you look directly at the design mode 5.11visitor
In fact, a class can have many sub-types in the class hierarchy! (This seems to be too much to say) even if these subtypes are different. They can always be attributed to an implementation class of an interface. So. You must remember: when you want to hit a dozen people. Hit (Devil), Hit (stick), dozen (loading); Of course, I want to hit them too, and we need to access the caller mode to handle the overloaded methods .
In addition to a friend, hit (Devil), Hit (stick), Hit (loaded), he can define the action on these two goods on the body of the new operation-for example, with a knife cut.
So, this reflects the intent of the access pattern--it's easy to add new interfaces to a class.
Last modified: 2015.4.26
3.5 Interview Mode (5.11)