您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)

next.gif
 (2959 bytes)


Content Index

Content Page # 23

State

The state of an object is the set of values of all its attributes at a point in time. At different points in time an object may have different states. The concept of state is important, since the way an object behaves to a message will depend on its state at the time the message is received.

Examples of a software object's state include the following:

  • whether the window for a document (or application) is maximised or minimised
  • whether an email application is connected on not
  • whether a calculator program is expecting a number to be typed, or an operator key such as +
  • the balance of a bank account object
  • the telephone number of a client object

Back to top

basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg