Download
art for chapter 2 modeling with uml n.
Skip this Video
Loading SlideShow in 5 Seconds..
Art for Chapter 2, Modeling with UML PowerPoint Presentation
Download Presentation
Art for Chapter 2, Modeling with UML

Art for Chapter 2, Modeling with UML

0 Views Download Presentation
Download Presentation

Art for Chapter 2, Modeling with UML

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Art for Chapter 2,Modeling with UML

  2. SimpleWatch ReadTime SetTime WatchUser WatchRepairPerson ChangeBattery Figure 2-1, A UML use case diagram describing the functionality of a simple watch.

  3. SimpleWatch 1 1 1 1 2 1 2 1 PushButton Display Battery Time Figure 2-2, A UML class diagram describing the elements of a simple watch.

  4. :SimpleWatch :Display :Time :WatchUser pressButton1() blinkHours() pressButton1() blinkMinutes() pressButton2() incrementMinutes() refresh() pressButtons1And2() commitNewTime() stopBlinking() Figure 2-3, A UML sequence diagram for the SimpleWatch.

  5. Increment Hours Increment Minutes Increment Seconds Figure 2-4, A UML statechart diagram for SetTime use case of the SimpleWatch. button2Pressed button1&2Pressed Blink Hours button1Pressed button2Pressed button1&2Pressed Blink Minutes button1Pressed button2Pressed Blink Stop Seconds Blinking

  6. Allocate Resources Open Coordinate Archive Incident Resources Incident Document Incident Figure 2-5, An example of a UML activity diagram.

  7. Figure 2-6, A Model is an abstraction describing a subset of a System. A View depicts selected aspects of a Model. Views and Models of a single System may overlap each other. Scale model Electrical All blueprints Airplane Fuel Flight simulator

  8. UML 1 * Book Chapter composed-of Booch N Book Chapter composed-of Figure 2-7, Example of describing a model with two different notations.

  9. EnterCalcMode() InputNumber(n) Figure 2-8, A UML class diagram depicting two classes: Watch and CalculatorWatch. CalculatorWatch is a refinement of Watch, providing calculator functionality normally not found in normal Watches. Watch time date SetDate(d) CalculatorWatch calculatorState

  10. Figure 2-9, An example of abstract class. OrganicCompound Benzene

  11. Figure 2-10, A UML class diagram depicting instances of two classes. «instanceOf» simpleWatch1291:Watch Watch «instanceOf» calculatorWatch1515 :CalculatorWatch CalculatorWatch

  12. :SimpleWatch :Time :TimeZone Figure 2-11, Examples of message sends. :WatchUser pressButton2() getTime() GMTTime getTimeDelta() GMTTime

  13. Figure 2-12, The application domain model represents entities of the environment which are relevant to an air traffic control system (e.g., aircraft, traffic controllers). Application Domain Solution Domain Application Domain Model System Model MapDisplay TrafficControl SummaryDisplay FlightPlanDatabase TrafficController Aircraft Airport TrafficControl FlightPlan

  14. Figure 2-13, An example of a UML use case diagram: Incident initiation in an accident management system. FRIEND Report Emergency OpenIncident FieldOfficer Dispatcher AllocateResources

  15. Figure 2-16, An example of an «include» relationship. «include» OpenIncident HelpDispatcher «include» AllocateResources

  16. «extend» OpenIncident ConnectionDown «extend» AllocateResources Figure 2-18, An example of an «extend» relationship.

  17. Figure 2-20, An example of a generalization relationship. Authenticate WithPassword Authenticate Authenticate WithCard

  18. Figure 2-22, An example of a UML class diagram: classes that participate in the ReportEmergency use case. reports 1 Incident EmergencyReport 1..* * reportsGenerated * incidentsGenerated Dispatcher FieldOfficer 1 1 name:String name:String badgeNumber:Integer badgeNumber:Integer initiator author

  19. Figure 2-23, An example of a UML object diagram: objects that participate in the warehouseOnFire scenario. report_1291 incident_1515 bob:FieldOfficer name = “Bob D.” badgeNumber = 132 john:Dispatcher name = “John D.” alice:FieldOfficer badgeNumber = 12 name = “Alice W.” badgeNumber = 23

  20. Figure 2-24, Example of a one-directional association. * * Polygon Point

  21. Figure 2-25, An example of an association class. Allocates role:String notificationTime:Time FieldOfficer Incident name:String 1 resources badgeNumber:Integer incident 1..*

  22. Figure 2-26, Alternative model for Allocation. Allocation 1 1 role:String notificationTime:Time FieldOfficer incident 1 name:String Incident badgeNumber:Integer 1..* resources

  23. 1 * 1 * State County Township 1 * PoliceStation PoliceOfficer 1 * Directory File Figure 2-27, Examples of aggregations.

  24. 1 1 PoliceOfficer BadgeNumber 1 * FireUnit FireTruck owner property * * FieldOfficer IncidentReport author report Figure 2-28, Examples of multiplicity.

  25. * FileSystemElement 1 Directory File Figure 2-29, Example of a hierarhical file system.

  26. * FileSystemElement * Directory File Figure 2-30, Example of a nonhierarchical file system.

  27. File Directory Directory File filename Figure 2-31, Example of how a qualified association uses reduces multiplicity. Without qualification 1 * filename With qualification 0..1 1

  28. PoliceOfficer name:String badgeNumber:Integer initiator author FieldOfficer Dispatcher 1 1 * reportsGenerated * incidents 1 EmergencyReport Incident 1..* Figure 2-32, An example of a generalization.

  29. Incident assignResource(r) close() Figure 2-33, Examples of operations provided by the Incident class.

  30. :SimpleWatch :Display :Time :WatchUser pressButton1() blinkHours() pressButton1() blinkMinutes() pressButton2() incrementMinutes() refresh() pressButtons1And2() commitNewTime() stopBlinking() Figure 2-34, Example of a sequence diagram: setting the time on 2Bwatch.

  31. Figure 2-35, Examples of conditions and iterators in sequence diagrams. a b c [i>0] op1() [i<=0] op2() *op3()

  32. Figure 2-36, Example of a collaboration diagram: Setting the time on 2Bwatch. :2BwatchOwner 1:p ressButtons1And2() 2:pressButton1() 3:pressButton2() 1.1: blinkHours() 4:pressButtons1And2() 2.1:blinkMinutes() 4.2:stopBlinking() :2BwatchInput :2BwatchDisplay 3.1:i ncrementMinutes() 4.1:c ommitNewTime() 3.2:r efresh() :2BwatchTime

  33. Figure 2-37, A UML statechart diagram for the Incident class. Active Inactive Closed Archived incidentHandled incidentDocumented incidentArchived

  34. pressButtonsLAndR MeasureTime SetTime after 2 min. pressButtonsLAndR/beep after 20 years after 20 years DeadBattery Figure 2-38, Statechart diagram for 2Bwatch set time function.

  35. pressBothButtons MeasureTime SetTime do/count ticks entry/blink hours pressButton1/blink next number pressButton2/increment current number exit/stop blinking after 2 min. pressBothButtons/beep after 20 years after 20 years MeasureTime Figure 2-39, Internal transitions associated with the SetTime state.

  36. Figure 2-40, Refined statechart associated with the SetTime state. SetTime b1 b1 BlinkHours BlinkMinutes BlinkSeconds b2/incr sec. b2/incr hour b2/incr min. b1 b1 BlinkYear BlinkMonth BlinkDay b2/incr year b2/incr mo. b2/incr day b1 b1

  37. Handle Document Archive Incident Incident Incident Figure 2-41, A UML activity diagram for Incident.

  38. [lowPriority] Open Allocate Incident Resources [fire & highPriority] [not fire & highPriority] Notify Fire Chief Notify Police Chief Figure 2-42, Example of decision in the OpenIncident process.

  39. Allocate Resources Open Coordinate Archive Incident Resources Incident Document Incident Figure 2-43, An example of complex transitions in a UML activity diagram.

  40. Allocate Resources Open Coordinate Archive Incident Resources Incident Document Incident Figure 2-44, An example of swimlanes in a UML activity diagram. Dispatcher FieldOfficer

  41. IncidentManagement Report Emergency Dispatcher OpenIncident FieldOfficer AllocateResources IncidentArchive SysAdministration ArchiveIncident ManageUsers Librarian SysAdmin SearchArchive ManageTerminals Figure 2-45, Example of packages: use cases of FRIEND organized by actors.

  42. IncidentManagement FieldOfficer Dispatcher SysAdministration IncidentArchive Librarian SysAdmin Figure 2-46, Example of packages.

  43. FieldStation DispatcherStation Dispatcher FieldOfficer EmergencyReport Incident Figure 2-47, Example of packages.

  44. Figure 2-48, An example of a note. Notes can be attached to a specific element in a diagram. FieldStation DispatcherStation Dispatcher FieldOfficer The Emer gencyReport class is defined in FieldStation and used in both stations. EmergencyReport Incident

  45. Figure 2-49, Examples of stereotypes. «entity» «control» «boundary» Year ChangeDateControl ButtonBoundary «entity» «entity» «boundary» Month Day LCDDisplayBoundary

  46. Figure 2-50, An example of constraint. reports 1 EmergencyReport Incident 1..* {ordered by time of receipt}