軟件工程課件:09-Uniform Modeling Language (UML)_第1頁
軟件工程課件:09-Uniform Modeling Language (UML)_第2頁
軟件工程課件:09-Uniform Modeling Language (UML)_第3頁
軟件工程課件:09-Uniform Modeling Language (UML)_第4頁
軟件工程課件:09-Uniform Modeling Language (UML)_第5頁
已閱讀5頁,還剩47頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、Outline1Why requirements engineering is criticalThe basic concepts Uniform Modeling Language (UML)Behavior-driven analysis SummaryWhy UML?Software Development2345The diversity of OOAD Notations .67OOD, Booch 91OOA, Coad/Yourdon 90CRC, Wirfs 90HOODRobinson 92OMT,Rumbaugh 91OODLE, Shlaer 92UML ISUnifi

2、ed Modeling Language:A graphical language for SpecifyingVisualizingConstructingDocumentingThe artifacts of software systemsThree AmigosBooch (Grady Booch) & OMT (Janes Rumbaugh) & OOSE (Ivar Jacobson)8A Brief History9Fusion first tryUnified Method 0.8OMG RFPUML 1.0OMG Stand.UML 1.xUML 2.0Booch and R

3、umbaughJoin RationalJacobsonJoin RationalUMLIndustry Standard199419951996199720032004Schlaer/MellorBoochRumbaughJacobsonCoad/YourdonArchitecture: “4+1” View UML Building BlocksModeling ElementsStructural elements: Class, Interface, use case, etc.Behavioral elements: action, state, etc.Grouping eleme

4、nts: packageAnnotational elementsRelationshipsDependency, association, aggregation, generalization, realization, composition, containment.DiagramStructural diagram: static modelingClass diagram, component diagram, deployment diagram, object diagram, package diagram, composite structure diagramBehavi

5、or diagram: dynamic modelingActivity diagram, interaction diagram (sequence, communication, interaction overview, timing), use case diagram, statechart diagram. 11Use Case DiagramRequirements ElicitationThe difficulties of requirement elicitationProblems of scopeThe boundary of the system is ill-def

6、inedSpecify unnecessary technical details that may confuse, rather than clarify, overall system objectives.Problems of understandingUnclear of what is neededTrouble communicating needs to engineersConflicting needs from different customer representativesAmbiguous or untestable requirementsProblems o

7、f volatilityRequirements change overtime13Use Case ModelPurposeSpecify the context of a systemShow interactions between the system and the entities external to the systemCapture the requirements of a systemUsers point of view, black-box representationsValidate a systems architectureDrive implementat

8、ion and generate test casesUse Case ModelGeneral rulesBuilt in early stages of developmentDeveloped by analysts and domain expertsConfirmed by all the stakeholdersUser-Appropriate Level of DetailUser-Appropriate VolumeNo more than 70-80 use cases for very large systems, I. Jacobson, OOPSLA 1996, tha

9、t is, average for 20-50SystemSystem BoundaryuserOtherSystemExternalEquipmentUse Case Model ExampleUML Use Case DiagramA use-case diagram is an illustration that shows the relationships among use cases and actors and among related use cases.Use Case: System functionalityActor: User or interactive sys

10、temSystem: A black-box of use casesUse Case DescriptionPurpose and function briefingAction sequencePre-condition:An observable status of the system before the use case starts.Post-condition: An observable status of the system after the execution of the use case.Basic event flow: “Happy Day” scenario

11、, normal pathExtended event flow: abnormal branchesScenarioIndividual instances of use cases that traverse a specific path using specific dataScenarios:1:basic flow2:basic flow, extended flow 13:basic flow, extended flow 1, extended flow 34:basic flow, extended flow 25:basic flow, extended flow 2, e

12、xtended flow 36:basic flow, extended flow 3startendExtendedFlow 1ExtendedFlow 2Extended Flow 3Basic flowUse Case - Actor RelationshipAssociationA use case can interact with one or more actorsActive actorPassive actorUse Case RelationshipGeneralizationInclude(use)ExtendActor RelationshipAssociationGe

13、neralizationAnalysis ProcessIdentify the ActorsIdentify the Use CasesCreate Use Case DiagramUse Case ReviewExample-1: The Weather Station A weather station is a package of software controlled instruments which collects data, performs some data processing and transmits this data for further processin

14、g. The instruments include air and ground thermometers, an anemometer, a wind vane, a barometer and a rain gauge. Data is collected every five minutes. When a command is issued to transmit the weather data, the weather station processes and summarises the collected data. The summarised data is trans

15、mitted to the mapping computer when a request is receivedExample-1: Use Case DiagramExample-2: A Library Support SystemThe library lends books and magazines to borrowers, who are registered in the system.The library handles purchase of new titles. Popular titles are bought in multiple copies. Old bo

16、oks and magazines are often removed. The librarian interacts with the customers. A borrower can reserve a book or magazine that is not currently available in the library and will get a notification when the book is returned or purchased. The reservation is canceled in appropriate conditions. The lib

17、rary can create, update, and delete information about titles, borrowers, loans, and reservations. The system can run on popular technical environment and has a modern GUI.Example-2: A Library Support SystemThe library lends books and magazines to borrowers.The borrowers register in the system.The li

18、brary handles purchase of new titles. The library bring popular titles.The library remove Old books and magazines. The librarian interacts with the customers. The librarian reserve a book or magazineThe librarian notify the borrower when the book is returned or purchased. A borrower cancel the reser

19、vation. The library can create, update, and delete information about titles, borrowers, loans, and reservations. Generic RulesActorAll the roles interacted with the system have been represented by ActorsEach actor is associated with at least one use caseCompose the actors if one actor includes the o

20、therDecompose the actors if they are associated with different unrelated use casesGeneric RulesUse CaseAll the major functionalities of the system have been represented by use casesCommonality analysis among use cases to identify new use cases and the extension, generalization and inclusion relation

21、ships among use casesDecompose complex use casesBehavior Modeling with UML Dynamic ModelsBehavior ModelUnderstand the sequence of interaction within the systemsIdentify events that drive the interaction sequence and understand how these events relate to specific classesCreate sequence diagram Build

22、a state diagram for each class and the systemReview to verify accuracy and consistencyUML Dynamic ModelsInteraction DiagramsSequence DiagramCollaboration DiagramState MachineStatechart DiagramActivity DiagramInteraction DiagramShows an interaction, consisting of a set of objects and their relationsh

23、ips, including the message that may be dispatched among them. Sequence diagram shows time ordering of messagesCollaboration diagram shows structural organization of objects that send and receive messages Semantically equivalentSequence DiagramIllustrates the classes that participate in a use caseSho

24、ws the messages that pass between classes over time for one use caseCan be a generic sequence diagram, but more frequently one is drawn for a single scenario within the use caseDesign diagrams are implementation specific database objects or specific GUI components serve as classesSequence Diagram No

25、tationsDefines event sequences that result in some desired outcome. The messages sent between objectsThe order in which messages occur Two dimensions Vertical, top down, the time sequence of messages/calls as they occurHorizontal, left to right, the object instances that the messages are sent to Bas

26、ic NotationsLifelineRepresents either roles or object instances that participate in the sequence being modeled.Objects should be traced to classes in the class diagramDrawn as a box with a dashed line descending from the center of the bottom edge. Basic NotationsMethod/Message callSynchronous callAs

27、ynchronous callMethod NameOptional Return MessageMessage sent to itselfReportingSystemgetAvailableReports()determinAvailableReports()SecuritySystemgetSecurityClearance(userId)Basic NotationsGuardsConditions must be met for a message to be sent to the objectGuardsExample Sequence Diagram43Example: Th

28、e ATM SystemATMBankRequest (inquiry, withdraw )Response44CardReaderCustomerConsoleCashDispenserReceiptPrinterReceiptWithdrawalInquiryAccountATMSessionTransactionBankMessageCardExample class relationships: the ATM Simulator:ATM:Withdraw:BankgetAmount ()checkIfCashAvailable (amount)initiateWithdraw (a

29、ccount, amount)getAccount ()dispenseCash ()finishWithdraw ()printReciept ()Example ATM Sequence DiagramExampleA weather data collection system is required to generate weather maps on a regular basis using data collected from remote, unattended weather stations and other data sources such as weather

30、observers, balloons and satellites. Weather stations transmit their data to the area computer in response to a request from that machine.The area computer validates the collected data and integrates it with the data from different sources. The integrated data is archived and, using data from this ar

31、chive and a digitised map database a set of local weather maps is created. Maps may be printed for distribution on a special-purpose map printer or may be displayed in a number of different formats.Example: Weather SystemA weather data collection system is required to generate weather maps on a regu

32、lar basis using data collected from remote, unattended weather stations and other data sources such as weather observers, balloons and satellites. Weather stations transmit their data to the area computer in response to a request from that machine.The area computer validates the collected data and i

33、ntegrates it with the data from different sources. The integrated data is archived and, using data from this archive and a digitised map database a set of local weather maps is created. Maps may be printed for distribution on a special-purpose map printer or may be displayed in a number of different

34、 formats.Example: Sequence AnalysisWeather stations collect dataarea computer requests data from Weather stationsWeather stations transmit their dataarea computer validates the collected dataarea computer integrates dataarea computer archives dataarea computer uses map databasearea computer creates weather maps map printer prints Maps area computer displays MapsCollect :Area Computer:Weat

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論