Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 2, Modeling with UML.

Slides:



Advertisements
Similar presentations
Notice: Surgery Sessions (Weeks 6-10)
Advertisements

Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML, Part 4 UML 2 Metamodel.
Software analysis and design tools T120B pavasario sem.
Presentation material is based on notes from Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 ECE.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 4, Requirements Elicitation.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 4, Requirements Elicitation.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 QUIZ 2 SOLUTIONS.
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.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Using UML, Patterns, and Java Object-Oriented Software Engineering Requirements Analysis (Part 1 – Object Modeling)
Chapter 2, Modeling with UML
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 UML First Pass: Class Diagrams Battery load()
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.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 4, Requirements Elicitation: Functional Modeling.
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.
Using UML, Patterns, and Java Object-Oriented Software Engineering Modeling with UML Chapter 2 Object-Oriented Software Engineering: Using UML, Patterns,
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.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML.
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.
COP 3331 OBJECT-ORIENTED ANALYSIS AND DESIGN Bob Myers Department of Computer Science Week 6 Lecture.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Figure 5-2, Products of requirements elicitation.
Requirements Analysis
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 4, Requirements Elicitation: Functional Modeling.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 5, Analysis: Object Modeling.
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 Art for Chapter 12, Software Life Cycle.
Modeling with UML Chapter 2 Object-Oriented Software Engineering: Using UML, Patterns, and Java, 2 nd Edition By B. Bruegge and A. Dutoit Prentice Hall,
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Using UML, Patterns, and Java Object-Oriented Software Engineering Functional Modeling.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Object Modeling.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: Review Session (Optional)
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: Review Session (Optional)
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.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 4, Requirements Elicitation: Functional Modeling.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering September 19, 2001 UML.
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.
Jan. 26, 2004CS WPI1 CS 509 Design of Software Systems Lecture #2 Monday, Jan. 26, 2004.
Using UML, Patterns, and Java Object-Oriented Software Engineering More on UML Note: Slides are adapted by Linda Sherrell from the Software Engineering.
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.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 5, Analysis: Object Modeling.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Chapter 2, Modeling with UML, Part 1
Modeling with UML Chapter 2
Chapter 2, Modeling with UML
Before we start Project Group A note about class project ArgoUML
CS410 – Software Engineering Lecture #17: UML I
Introduction to Unified Modeling Language (UML)
Art for Chapter 2, Modeling with UML
Chapter 2, Modeling with UML
Chapter 2, Modeling with UML
Chapter 2, Modeling with UML
Chapter 5, Analysis: Object Modeling
COP 4009 Component-Based Software Engineering
CS410 – Software Engineering Lecture #9: UML
Chapter 2, Modeling with UML
Presentation transcript:

Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 2, Modeling with UML

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 2 WatchUserWatchRepairPerson ReadTime SetTime ChangeBattery SimpleWatch Figure 2-1, A UML use case diagram describing the functionality of a simple watch.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 3 Figure 2-2, A UML class diagram describing the elements of a simple watch SimpleWatch DisplayBatteryTimePushButton

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 4 Figure 2-3, A UML sequence diagram for the SimpleWatch. :SimpleWatch:Time:Display pressButton1() blinkHours() blinkMinutes() pressButton2() incrementMinutes() refresh() pressButtons1And2() commitNewTime() stopBlinking() pressButton1() :WatchUser

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 5 button1&2Pressed button1Pressed button2Pressed button1Pressed button1&2Pressed Increment Minutes Increment Hours Blink Hours Blink Seconds Blink Minutes Increment Seconds Stop Blinking Figure 2-4, A UML statechart diagram for SetTime use case of the SimpleWatch.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 6 Open Incident Allocate Resources Coordinate Resources Document Incident Archive Incident Figure 2-5, An example of a UML activity diagram.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 7 Airplane All blueprints Scale model Electrical 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.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 8 BookChapter N composed-of Booch BookChapter composed-of UML 1* Figure 2-7, Example of describing a model with two different notations.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 9 Watch time date CalculatorWatch SetDate(d) EnterCalcMode() InputNumber(n) calculatorState 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.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 10 OrganicCompound Benzene Figure 2-9, An example of abstract class.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 11 Watch CalculatorWatch simpleWatch1291:Watch calculatorWatch1515 :CalculatorWatch «instanceOf» Figure 2-10, A UML class diagram depicting instances of two classes.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 12 pressButton2() getTime() getTimeDelta() :WatchUser GMTTime :SimpleWatch:TimeZone:Time Figure 2-11, Examples of message sends.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 13 Application DomainSolution Domain Application Domain ModelSystem Model Aircraft TrafficController FlightPlan Airport MapDisplay FlightPlanDatabase SummaryDisplay TrafficControl 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).

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 14 Report Emergency FieldOfficerDispatcher OpenIncident AllocateResources FRIEND Figure 2-13, An example of a UML use case diagram: Incident initiation in an accident management system.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 15 OpenIncident AllocateResources HelpDispatcher «include» Figure 2-16, An example of an «include» relationship.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 16 Figure 2-18, An example of an «extend» relationship. OpenIncident AllocateResources ConnectionDown «extend»

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 17 Authenticate WithPassword WithCard Figure 2-20, An example of a generalization relationship.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 18 EmergencyReport Incident FieldOfficer name:String badgeNumber:Integer Dispatcher name:String badgeNumber:Integer author incidentsGenerated reportsGenerated initiator reports 1 * 1 * 1..* 1 Figure 2-22, An example of a UML class diagram: classes that participate in the ReportEmergency use case.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 19 report_1291incident_1515 bob:FieldOfficer name = “Bob D.” badgeNumber = 132 john:Dispatcher name = “John D.” badgeNumber = 12 alice:FieldOfficer name = “Alice W.” badgeNumber = 23 Figure 2-23, An example of a UML object diagram: objects that participate in the warehouseOnFire scenario.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 20 Figure 2-24, Example of a one-directional association. PolygonPoint **

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 21 Incident FieldOfficer name:String badgeNumber:Integer Allocates role:String notificationTime:Time resources incident 1 1..* Figure 2-25, An example of an association class.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 22 Incident FieldOfficer name:String badgeNumber:Integer Allocation role:String notificationTime:Time resources incident1 1..* 1 1 Figure 2-26, Alternative model for Allocation.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 23 ** PoliceStation * * State Directory County PoliceOfficer File Township Figure 2-27, Examples of aggregations.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 24 Figure 2-28, Examples of multiplicity. FieldOfficerIncidentReport * * FireUnitFireTruck * 1 PoliceOfficer 1 1 owner property author report BadgeNumber

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 25 Figure 2-29, Example of a hierarhical file system. Directory FileSystemElement File 1 *

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 26 Figure 2-30, Example of a nonhierarchical file system. Directory FileSystemElement File * *

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 27 Figure 2-31, Example of how a qualified association uses reduces multiplicity. DirectoryFile filename Directory File filename 1 Without qualification With qualification *

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 28 EmergencyReport Incident FieldOfficer Dispatcher author initiator reportsGenerated incidents 1 * 1 * 1..* 1 PoliceOfficer name:String badgeNumber:Integer Figure 2-32, An example of a generalization.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 29 Incident assignResource(r) close() Figure 2-33, Examples of operations provided by the Incident class.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 30 :SimpleWatch:Time:Display pressButton1() blinkHours() blinkMinutes() pressButton2() incrementMinutes() refresh() pressButtons1And2() commitNewTime() stopBlinking() pressButton1() :WatchUser Figure 2-34, Example of a sequence diagram: setting the time on 2Bwatch.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 31 abc [i>0] op1() [i<=0] op2() *op3() Figure 2-35, Examples of conditions and iterators in sequence diagrams.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 32 Figure 2-36, Example of a collaboration diagram: Setting the time on 2Bwatch. :2BwatchInput :2BwatchTime :2BwatchDisplay 1:pressButtons1And2() 1.1:blinkHours() 3.1:incrementMinutes() 3.2:refresh() 4.1:commitNewTime() :2BwatchOwner 2:pressButton1() 3:pressButton2() 4:pressButtons1And2() 2.1:blinkMinutes() 4.2:stopBlinking()

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 33 ActiveInactiveClosedArchived incidentHandledincidentDocumentedincidentArchived Figure 2-37, A UML statechart diagram for the Incident class.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 34 MeasureTime SetTime pressButtonsLAndR pressButtonsLAndR/beep after 2 min. DeadBattery after 20 years Figure 2-38, Statechart diagram for 2Bwatch set time function.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 35 Figure 2-39, Internal transitions associated with the SetTime state. SetTime entry/blink hours exit/stop blinking pressButton1/blink next number pressButton2/increment current number MeasureTime do/count ticks MeasureTime pressBothButtons pressBothButtons/beep after 2 min. after 20 years

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 36 SetTime BlinkHoursBlinkMinutesBlinkSeconds BlinkYearBlinkMonthBlinkDay b2/incr hourb2/incr min. b2/incr sec. b2/incr yearb2/incr mo. b2/incr day b1 Figure 2-40, Refined statechart associated with the SetTime state.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 37 Document Incident Archive Incident Handle Incident Figure 2-41, A UML activity diagram for Incident.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 38 [fire & highPriority] [not fire & highPriority] [lowPriority] Notify Fire Chief Open Incident Notify Police Chief Allocate Resources Figure 2-42, Example of decision in the OpenIncident process.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 39 Archive Incident Open Incident Document Incident Allocate Resources Coordinate Resources Figure 2-43, An example of complex transitions in a UML activity diagram.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 40 Archive Incident Dispatcher FieldOfficer Open Incident Document Incident Allocate Resources Coordinate Resources Figure 2-44, An example of swimlanes in a UML activity diagram.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 41 Report Emergency FieldOfficer Dispatcher OpenIncident AllocateResources ArchiveIncident SearchArchive ManageUsers ManageTerminals LibrarianSysAdmin SysAdministrationIncidentArchive IncidentManagement Figure 2-45, Example of packages: use cases of FRIEND organized by actors.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 42 FieldOfficerDispatcher Librarian SysAdmin IncidentArchive SysAdministration IncidentManagement Figure 2-46, Example of packages.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 43 DispatcherStation EmergencyReportIncident FieldOfficer Dispatcher FieldStation Figure 2-47, Example of packages.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 44 EmergencyReport DispatcherStation Incident FieldOfficer Dispatcher FieldStation The EmergencyReport class is defined in FieldStation and used in both stations. Figure 2-48, An example of a note. Notes can be attached to a specific element in a diagram.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 45 «entity» «boundary» «control» Year Month ChangeDateControl LCDDisplayBoundary ButtonBoundary «entity» Day Figure 2-49, Examples of stereotypes.

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 46 EmergencyReport Incident reports 1..* {ordered by time of receipt} Figure 2-50, An example of constraint. 1