Visitor Pattern

Monday, April 21, 2014

After I wrote the previous post I understand that must of the time by accident we couple the logic to the model too much, and that all in the name of capsulation. Let’s take for example the next Classes: We can see here 3 concrete Classes that diverted from SmartDevice Class. Tables, Phones & Watches. As you can see I reviled 4 methods here (I you can imagine there are more than that), By from my point of view under 2 categories: Close Method: No change on the logic, no extension required Support3G: By the device spec, or it’s supported of  not MemorySize: The same...