This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes OO, Patterns, UML and Refactoring and the fly likes Question on Command pattern from GoF book Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Question on Command pattern from GoF book" Watch "Question on Command pattern from GoF book" New topic
Author

Question on Command pattern from GoF book

Sai Swami
Ranch Hand

Joined: Sep 24, 2002
Posts: 51
Hi Ranchers,

Had a quick question on the Command pattern:

The Structure diagram of Command pattern in the GoF book shows a straight arrow of "Client" towards "Receiver" and a dotted arrow from "Client" to "ConcreteCommand".

Can anyone please tell me why a straight line and a dotted line if they both mean the same thing that there is a reference.


Thanks in advance,
Sai
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1763
    
    7

The dotted arrow models a dependency, while the solid arrow models an association.

Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Sai Swami
Ranch Hand

Joined: Sep 24, 2002
Posts: 51
Thanks a lot Jelle !
 
GeeCON Prague 2014
 
subject: Question on Command pattern from GoF book