Object and Class Specification

Class: Button

1.0 Precise and Concise Description

  1. 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.

  2. A button is an "object with life" which is used by an outside source to request service from the system.

  3. 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."

  4. Buttons have no suffered operations. [However, hardware ("real world") buttons suffer the operations of being pressed and released.]

  5. The states that the button may be in are "pressed" and "not pressed." Neither of these two states is very persistent.

  6. 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

  1. 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

  1. Non-applicable.

2.2.1.1.1 Notes on State Transition Diagrams for Non-Spontaneous State Changes

  1. 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

  1. The "button abstraction" knows when the "real world" button has been pressed via a required operation, i.e., "Press."

  2. 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

  1. Buttons have no suffered operations. [However, hardware ("real world") buttons suffer the operations of being pressed and released.]

4.0 State Information

  1. The states that the button may be in are pressed and not pressed.

5.0 Constants and Exceptions

5.1 Constants

  1. This class will neither provide or require any constants.

5.2 Exceptions

  1. This class will neither provide or require any exceptions.

[TOA Home Page] [HTML
Documents] [Contact TOA]