KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I don't understand why a Command pattern is convenient in object-oriented design. Instead of using, e.g. the Command Switch which has a reference to the Lamp class, can't I just create a Switchable abstract class and invoke its methods? In this way I'm decoupling the invoker and receiver anyway, and I don't have to create a Command object for each receiver class.
Tags (comma-separated)
Save Edits
Cancel