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.

Collaboration Diagrams 93msg1():POST1:*li:=nextLineItem():SalesLineItem:Salemsg1()Ø:POST1:*[i:=1..10] li:=nextLineItem():SalesLineItem:SaleFigure 7.6: Iteration <strong>with</strong> and <strong>with</strong>out recurrence values:Amsg1()1:*[i:=1..10] msg2()myB:Bmsg1(){for i:=1 to 10{myB.msg2()myC.msg3()}}Ø2:*[i:=1..10] msg3()myC:CFigure 7.7: Multiple message <strong>with</strong>in the same iteration clauseRepresenting creation of instances The <strong>UML</strong> creation message is create which is independent of programminglanguages, shown being sent to the instance being created. Optionally, the newly created instancemay include a symbol (See Figure 7.8).¹¹U+ND»²²msg1():POSTcreate(cashier)>:SaleFigure 7.8: Instance CreationA IE:N:R¥CXN message can optionally take parameters when some attributes of the object to be created need tobe set an initial value.Representing message number sequencing The order of messages is illustrated <strong>with</strong> sequence numbers,as shown in Figure 7.9. The numbering scheme is:1. The first message is not numbered. Thus, YvA¦h-|§ ¤£ is unnumbered.Report 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!