13.07.2015 Views

Object-Oriented Software Development with UML - UNU-IIST ...

Object-Oriented Software Development with UML - UNU-IIST ...

Object-Oriented Software Development with UML - UNU-IIST ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

156 Modelling Behaviour in State DiagramsProductsProductCatalog1 1..*Described-bySales::SalesLineItem*1ProductSpecificationdescriptionpriceupc0..1Records-sale-ofØCore::Store1DescribesStocks*1 *Item1Figure 9.26: Products packageState TransitionsIn general, detecting (receiving) an event can cause an object to move from one state to another. Such¾a move is called a state transition.A state transition is a relationship between two states that indicates that when a event occurs, the¾object changes from the prior state to the subsequent state.¾The behaviors of an object is described in terms of it state transitions.Examples of State Transitions1. When the event “off hook” occurs, the state transition from state Ä Ñ Á†Æ to state À¥ÒÈTÄÿ Æ is taken place.2. If event “load” occurs when the CD is in ÑÏ ÀòQÆ ÏBÙ Ó•ÆÅ state, the state transition from ÑÏ À§òQÆ ÏÙ Ó•ÆDÅ toÑ§Ï ÀòQÆ Ï ÛcÁÐ ÂÆ Ñis taken place.<strong>UML</strong> Notation for State DiagramA <strong>UML</strong> state diagram illustrates the interesting events and states of an object, and the behaviour of¾an object in reaction to an event.State transitions are shown as arrows, labelled <strong>with</strong> their events.¾States are shown in rounded rectangles.¾the instance is created.¾It is common to include an initial pseudo-state which automatically transitions to another state whenReport No. 259, July 2002<strong>UNU</strong>/<strong>IIST</strong>, P.O. Box 3058, Macau

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!