软件开发的家园,编程爱好者的天地.

现在是:北京时间 2016/4/14 上午11:50:51 星期四

设为首页  |  加入收藏  |  网站地图

顺序图(英文)
发布于:第八基地 来源:互联网 作者:天堂路上 时间:2011-10-14 点击:145
Purpose

Thesequencediagram(SD)specifiesthetimeandcontrolaspectsofasystem.Typically,youusetheSDtoanalyzeonlythemorecomplexbusinessevents.SimplebusinesseventsrarelyrequireanSD.

Comparedwithacollaborationdiagram

Acollaborationdiagramshowstheobjectsandrelationshipsinvolvedinaninteraction.Itshowsthemessagesexchangedamongtheobjectsduringtheinteraction,numberingthemtoshowthesequenceofmessages.Itdoesnotshowthetimingofthemessages.

Filetype

Inmostcases,adiagram'sfiletypematchesitsabbreviation.ThisisnottruefortheSD,whichhasafiletypeofetd.InOMT,theSDisaneventtracediagram(ETD).

Definitions

Eventsareactionsbetweentheobjectsinyourproject.Theycanalsotransmitdata.

Ascenarioisthesequenceofeventsduringoneexecutionofaprogram.Ascenariocanincludealltheeventsoronlytheeventssenttoorreceivedbycertainobjectsinthesystem.AnSDcancontainmorethanonescenario.Forexample,youmightcreateanSDthatprovidestwoscenariosforplacingacustomerorder:oneforanexistingcustomerandtheotherforanewcustomer.

ExampleSD

ThisSDshowsasimplescenariofortheuseofanautomatictellermachine.Inthisscenario,thesystemrejectsthecard.Forthecustomerthistransactionissimple:heinsertsthecardandthecardisrejected.Forthesystem,severalactionsarenecessary.Aconstraintspecifies10secondsasthemaximumacceptabletimeintervalforthetransaction.

Thissequenceisfairlygeneral;youcanworkouttheInsertCardeventmorecompletelybyincludingdetailssuchasenteringthepersonalidentificationnumberandrequestingthetypeoftransaction.TheanalystmustdecidewhatlevelofdetailtouseintheSDs.

Controlpanel

Thecontrolpanelforthesequencediagram.

对我有帮助
(0)
0%
对我没帮助
(0)
0%
返回顶部
在线反馈
在线反馈