A "real world" button is made of some hard material (usually plastic and
metal) and is used to signal the occurrence of some external event (usually
by closing a circuit). In most cases, a button is a two state device (e.g.,
"pressed" and "not pressed") although it is possible for a button to have
more than two states.
A button is an "object with life" which is used by an outside source to
request service from the system.
The required operations for the button are Signal and Press. Press is the
operation which connects an instance of this class with the "outside world"
(e.g., with a port) so that it knows that a "real world" button has been
pressed. Signal is an operation which allows the button to alert a designated
object, or system of objects, that it has been "pressed."
Buttons have no suffered operations. [However, hardware ("real world")
buttons suffer the operations of being pressed and released.]
The states that the button may be in are "pressed" and "not pressed."
Neither of these two states is very persistent.
There are no constants or exceptions associated with the button.
2.0 Graphical Representations
2.1 Static Representations
2.1.1 Semantic Networks
2.1.2 Notes On the Semantic Networks
To the outside world, a button is a monolithic object.
2.2 Dynamic Representations
2.2.1 State Transition Diagrams
2.2.1.1 State Transition Diagrams for Non-Spontaneous State Changes
Non-applicable.
2.2.1.1.1 Notes on State Transition Diagrams for Non-Spontaneous State Changes
There are no non-spontaneous state changes for this class.
2.2.1.2 State Transition Diagrams for Spontaneous State Changes
2.2.1.2.1 Notes on State Transition Diagrams for Spontaneous State Changes
The "button abstraction" knows when the "real world" button has been
pressed via a required operation, i.e., "Press."
When the "button abstraction" is made aware that the "real world" button
has been pressed, it invokes the "Signal" operation.
3.0 Operations
3.1 Required Operations
Operation
Method
Signal
Alerts the button's client that the button has
been pressed and returns the buttons identification.
Press
Alerts the button that it has been "pressed"
3.2 Suffered Operations
Buttons have no suffered operations. [However, hardware ("real world")
buttons suffer the operations of being pressed and released.]
4.0 State Information
The states that the button may be in are pressed and not pressed.
5.0 Constants and Exceptions
5.1 Constants
This class will neither provide or require any constants.
5.2 Exceptions
This class will neither provide or require any exceptions.