Command

Command - Command Design Pattern Source: Design Patterns...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Command Design Pattern Source: Design Patterns – Elements of Reusable Object- Oriented Software; Gamma, et. al.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Problem Calling a method tightly couples the invoking class to the receiving class The invoker must specify: Which object to call Which method to call What parameters to send with the call Sometimes it is useful for a class to be able to invoke an operation on another class without having knowledge of what class it is calling, what method is being called, or what parameters are being sent
Background image of page 2
Example: GUI Toolkit A GUI toolkit provides a full complement of components Buttons, scroll bars, text boxes, menus, etc. Toolkit components know how to draw themselves on the screen, but they don't know how to perform application logic Application developers need a way to associate application logic with GUI components What should happen when a button is pressed? What should happen when a menu item is selected?
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/02/2012 for the course C S 340 taught by Professor Woodfield,s during the Winter '08 term at BYU.

Page1 / 9

Command - Command Design Pattern Source: Design Patterns...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online