Art for Chapter 2, Modeling with UML

Slides:



Advertisements
Similar presentations
Software analysis and design tools T120B pavasario sem.
Advertisements

Slides by Bruegee and Dutoit, Modified by David A. Gaitros COP 3331 Object Oriented Analysis and Design Chapter 2: Object Oriented Modeling using UML Jean.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Art for Chapter 5, Analysis.
Unified Modeling Language (UML) Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Requirements Elicitation Chapter 4. Establishing Requirements Two questions –What is the purpose of the system –What is inside and what is outside the.
Use Cases Chapter 4. After Scenarios Find all the use cases in the scenario that specifies all possible instances of how to report a fire –Ex: “Report.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 2, Modeling with UML.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering September 5, 2001 Introduction.
Unified Modeling Language (UML)
1 Modeling with UML CMPE 131 Fall Overview What is modeling? What is UML? Use case diagrams Class diagrams Sequence diagrams Activity diagrams.
1 CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
Unified Modeling Language
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Functional Modeling.
Course information and deadline reminders
COP 3331 Object-Oriented Analysis and Design 1 Modeling and UML  UML = Unified Modeling Language  Graphical Notation  Topics  Modeling  Basics of.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Introduction to Software Engineering ECSE-321 Unit 5 – Modeling with UML.
程建群 博士(Dr. Jason Cheng) 年03月
Requirements Analysis
MODELING WITH UML - INTRODUCTION UML offers a well defined syntax (for object representation/description), well defined semantics (to foster common understanding.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 4, Requirements Elicitation: Functional Modeling.
Sept. 25, 2003CS WPI1 CS 509 Design of Software Systems Lecture #4 Thursday, Sept. 25, 2003.
UML Review of diagram types. 2 Unified Modeling Language The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson, and.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
An Introduction to the Unified Modeling Language
Modeling with UML The Unified Modeling Language (UML) is a standard graphical language for modeling an object-oriented software by providing a standard.
CH-4 Advanced class modeling. BookChapter N composed-of Booch BookChapter composed-of UML 1* Figure 2-7. Example of describing a model with two different.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
Jan. 26, 2004CS WPI1 CS 509 Design of Software Systems Lecture #2 Monday, Jan. 26, 2004.
COP 3331 OBJECT-ORIENTED ANALYSIS AND DESIGN Bob Myers Department of Computer Science.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
UML Review of Use case diagrams. 2 Unified Modeling Language The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson,
Chapter 3: Introducing the UML
Activity & Class Modeling Labs Discussion p3 T120B pavasario sem.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Systems Analysis and Design in a Changing World, Fourth Edition
Business Process and Functional Modeling
Chapter 2, Modeling with UML
Modeling with UML Chapter 2
Chapter 2, Modeling with UML
The Movement To Objects
Introduction to UML.
Before we start Project Group A note about class project ArgoUML
CS410 – Software Engineering Lecture #17: UML I
Chapter 2, Modeling with UML
Introduction to Unified Modeling Language (UML)
Chapter 2, Modeling with UML
The Process of Object Modeling
Chapter 2, Modeling with UML
Models and Modelling Object-Oriented Analysis David William Brown
Chapter 2, Modeling with UML
Week 12: Activity & Sequence Diagrams
University of Houston-Clear Lake
Chapter 2, Modeling with UML
Chapter 2, Modeling with UML
Chapter 2, Modeling with UML
Chapter 20 Object-Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Chapter 4, Requirements Elicitation: Functional Modeling
Chapter 4, Requirements Elicitation: Functional Modeling
Chapter 5, Analysis: Object Modeling
CIS 375 Bruce R. Maxim UM-Dearborn
CS410 – Software Engineering Lecture #9: UML
Chapter 2, Modeling with UML
Presentation transcript:

Art for Chapter 2, Modeling with UML

SimpleWatch ReadTime SetTime ChangeBattery WatchRepairPerson WatchUser Figure 2-1. A UML use case diagram describing the functionality of a simple watch. The WatchUser actor may either consult the time on her watch (with the ReadTime use case) or set the time (with the SetTime use case). However, only the WatchRepairPerson actor may change the battery of the watch (with the ChangeBattery use case). Actors are represented with stick figures, use cases with ovals, and the boundary of the system with a box enclosing the use cases.

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

Figure 2-3. A UML sequence diagram for the SimpleWatch Figure 2-3. A UML sequence diagram for the SimpleWatch. The leftmost column represents the timeline of the WatchUser actor who initiates the use case. The other columns represent the timeline of the objects that participate in this use case. Object names are underlined to denote that they are instances (as opposed to classes). Labeled arrows are stimuli that an actor or an object sends to other objects.

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

Allocate Resources Open Incident Coordinate Resources Archive Incident Document Incident Figure 2-5. An example of a UML activity diagram. Activity diagrams represent behavior in terms of activities and their precedence constraints. The completion of an activity triggers an outgoing transition, which in turn may initiate another activity.

Scale model Electrical All blueprints Airplane Fuel Flight simulator 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.

Book Chapter composed-of UML 1 * Booch N Book Chapter composed-of Figure 2-7. Example of describing a model with two different notations. The model includes two classes, Book and Chapter, with the relationship, Book is composed of Chapters. In UML, classes are depicted by rectangles and aggregation associations by a line terminated with a diamond. In the Booch notation, classes are depicted by clouds, and aggregation associations are depicted with a line terminated with a solid circle.

Figure 2-8. Example of describing the same model with two different notations. This UML diagram represents the information of Figure 2-6: A System can be described by many different Models that can be depicted by many different Views.

Name Purpose Members Clock A device that measures time. Figure 2-9. The three components of the Clock concept: name, purpose, and members.

Watch time date SetDate(d) CalculatorWatch calculatorState EnterCalcMode() InputNumber(n) Figure 2-10. 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. In a UML class diagram, classes and objects are represented as boxes with three compartments: The first compartment depicts the name of the class, the second depicts its attributes, the third its operations. The second and third compartments can be omitted for brevity. An inheritance relationship is displayed by a line terminated with a triangle. The triangle points to the superclass, and the other end is attached to the subclass.

Figure 2-11. An example of abstract class (UML class diagram) Figure 2-11. An example of abstract class (UML class diagram). OrganicCompound is never instantiated and only serves as a generalization.

<<instanceOf>> simpleWatch1291:Watch Watch calculatorWatch1515 <<instanceOf>> :CalculatorWatch CalculatorWatch Figure 2-12. A UML class diagram depicting instances of two classes. simpleWatch1291 is an instance of Watch. calculatorWatch1515 is an instance of CalculatorWatch. Although the operations of Watch are also applicable to calculatorWatch1515, the latter is not an instance of the former.

:SimpleWatch :Time :TimeZone :WatchUser pressButton2() getTime() GMTTime getTimeDelta() GMTTime Figure 2-13. Examples of message sends (UML sequence diagram). The Watch object sends the getTime() message to a Time object to query the current Greenwich time. It then sends the getTimeDelta() message to a TimeZone objects to query the difference to add to the Greenwich time. The dashed arrows represent the results that are sent back to the message sender.

Application Domain Solution Domain Application Domain Model System Model Aircraft TrafficController FlightPlan Airport MapDisplay FlightPlanDatabase SummaryDisplay TrafficControl Figure 2-14. The application domain model represents entities of the environment which are relevant to an air traffic control system (e.g., aircraft, traffic controllers). The system model represents entities that are part of the system (e.g., map display, flight plan database). In object-oriented analysis and design, the application domain model is also part of the system model. An example in this figure is the TrafficControl package that appears in both models.

Figure 2-15. An example of a UML use case diagram: Incident initiation in an accident management system. Associations between actors and use cases represent information flows. In UML, these associations are bidirectional: They can represent the actor initiating a use case (e.g., FieldOfficer initiates ReportEmergency) or a use case providing information to an actor (e.g., ReportEmergency notifies Dispatcher).

Figure 2-18. An example of an <<include>> relationship (UML use case diagram).

<<extend>> OpenIncident ConnectionDown <<extend>> AllocateResources Figure 2-19. An example of an <<extend>> relationship (UML use case diagram).

Figure 2-21. An example of a generalization relationship (UML use case diagram). The Authenticate use case is a high-level use case describing, in general terms, the process of authentication. AuthenticateWithPassword and AuthenticateWithCard are two specializations of Authenticate.

reports 1 EmergencyReport Incident 1..* reportsGenerated * * incidentsGenerated FieldOfficer Dispatcher 1 name:String 1 name:String badgeNumber:Integer badgeNumber:Integer author initiator Figure 2-22. An example of a UML class diagram: classes that participate in the ReportEmergency use case. Detailed type information is usually omitted until object design

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

Figure 2-24. An example of an association class (UML class diagram). Allocates role:String notificationTime:Time FieldOfficer Incident name:String 1 resources badgeNumber:Integer incident 1..* Figure 2-24. An example of an association class (UML class diagram).

Figure 2-25. Alternative model for Allocation (UML class diagram). 1 1 role:String notificationTime:Time FieldOfficer incident 1 name:String badgeNumber:Integer Incident 1..* resources Figure 2-25. Alternative model for Allocation (UML class diagram).

1 * 1 * State County Township 1 * PoliceStation PoliceOfficer 1 * Directory File Figure 2-26. Examples of aggregations (UML class diagram). A State contains many Counties, which in turn contains many Townships. A PoliceStation has many PoliceOfficers. A file system Directory contains many Files.

PoliceOfficer name:String badgeNumber:Integer initiator author FieldOfficer Dispatcher 1 1 * reportsGenerated * incidents 1 EmergencyReport Incident 1..* Figure 2-27. An example of a generalization (UML class diagram). PoliceOfficer is an abstract class which defines the common attributes and operations of the FieldOfficer and Dispatcher classes.

Incident assignResource(r) close() Figure 2-28. Examples of operations provided by the Incident class (UML class diagram).

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

Figure 2-30. Examples of conditions and iterators in sequence diagrams.

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

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

Figure 2-33. Internal transitions associated with the SetTime state (UML statechart diagram).

Figure 2-34. Refined statechart associated with the SetTime state (UML statechart diagram).

Handle Incident Document Incident Archive Incident Figure 2-35. A UML activity diagram for Incident. During the action state HandleIncident, the Dispatcher receives reports and allocates resources. Once the Incident is closed, the Incident moves to the DocumentIncident activity during which all participating FieldOfficers and Dispatchers document the Incident. Finally, the ArchiveIncident activity represents the archival of the Incident related information onto slow access medium.

[not fire & highPriority] Open Incident [lowPriority] Allocate Resources [fire & highPriority] [not fire & highPriority] Notify Fire Chief Notify Police Chief Figure 2-36. Example of decision in the OpenIncident process. If the Incident is a fire and is of high priority, the Dispatcher notifies the FireChief. If it is a high-priority Incident that is not a fire, the PoliceChief is notified. In all cases, the Dispatcher allocates resources to deal with the Incident.

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

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

IncidentManagement Report Emergency OpenIncident Dispatcher FieldOfficer AllocateResources IncidentArchive SysAdministration ArchiveIncident ManageUsers Librarian SysAdmin SearchArchive ManageTerminals Figure 2-39. Example of packages: use cases of FRIEND organized by actors (UML use case diagram).

Figure 2-40. Example of packages: This figure displays the same packages as Figure 2-39 except that the details of each packages are suppressed (UML use case diagram).

Figure 2-41. Example of packages Figure 2-41. Example of packages. The FieldOfficer and EmergencyReport classes are located in the FieldStation package, and the Dispatcher and Incident classes are located on the DispatcherStation package.

Figure 2-42. An example of a note Figure 2-42. An example of a note. Notes can be attached to a specific element in a diagram.

Figure 2-43. Examples of stereotypes (UML class diagram).

Figure 2-44. An example of constraint (UML class diagram).