Using UML, Patterns, and Java Object-Oriented Software Engineering More on UML Note: Slides are adapted by Linda Sherrell from the Software Engineering.

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.
SEQUENCE DIAGRAM. UML diagrams There are many ways of organizing the UML diagrams. Can be organized as the fallowing: 1. Structural diagrams: to show.
Chapter 4,Use Case and Statechart Diagrams
Software analysis and design tools T120B pavasario sem.
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.
Chapter 2, Modeling with UML, Part 2
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, UML ile Modelleme, Bölüm 2.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Chapter 3,Class Diagram.
Using UML, Patterns, and Java Object-Oriented Software Engineering Requirements Analysis (Part 1 – Object Modeling)
Interaction Diagrams Software Engineering BIT8. Interaction Diagrams  A series of diagrams describing the dynamic behavior of an object-oriented system.
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()
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 UML Sequence Diagrams  Used during system.
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 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.
SEQUENCE DIAGRAM Prepared by: T. Fatimah Alageel.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML.
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.
1 Behavioral diagrams (2) Lecture p5 T120B pavasario sem.
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.
UNB CS3013 Software Engineering II lectures adapted from Bernd Bruegge & Allen Dutoit, Object-Oriented Software Engineering: Conquering Complex and Changing.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Object Modeling.
Chapter 2, Modeling with UML, Part 2
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)
7 Systems Analysis and Design in a Changing World, Fifth Edition.
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.
1 An Introduction to UML Interaction (Sequence and Communication) Diagrams Georgia State University CIS 3300 Spring, 2009.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering September 19, 2001 UML.
Introduction to UML 임현승 강원대학교 Revised from the slides by Bernd Bruegge and Allen H. Dutoit for the book “Object-Oriented Software Engineering: Using UML,
Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 1, Introduction to 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.
Chapter 3: Introducing the UML
UML Review Overview: modeling with UML  What is modeling?  What is UML?  Use case diagrams  Class diagrams  Sequence diagrams  Activity diagrams.
CEN 5011 Advanced Software Engineering
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
L5-1. L5-2 Recap : UML artefacts Black Box Requirements System Design System Development System Test System Validation Functional Specification Actors.
Chapter 2, Modeling with UML
UML Review.
Modeling with UML Chapter 2
Chapter 2, Modeling with UML, Part 2
Chapter 2, Modeling with UML
Chapter 2: Modeling with UML - 2
EKT 421 SOFTWARE ENGINEERING
CS410 – Software Engineering Lecture #17: UML I
Chapter 2, Modeling with UML
Chapter 2, Modeling with UML
Chapter 2, Modeling with UML
Chapter 2, Modeling with UML
Chapter 2, Modeling with UML
Chapter 2, Modeling with UML
Recap : UML artefacts Black Box Requirements Functional Specification
CS410 – Software Engineering Lecture #9: UML
Chapter 2, Modeling with UML
Presentation transcript:

Using UML, Patterns, and Java Object-Oriented Software Engineering More on UML Note: Slides are adapted by Linda Sherrell from the Software Engineering text as noted to the left. The text is by Bernd Brugge and Alan Dutoit

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 2 Class Diagrams  Class diagrams represent the structure of the system.  Used  during requirements analysis to model problem domain concepts  Called the Domain Model during the Requirements Workflow  during system design to model subsystems and interfaces  during object design to model classes. Enumeration getZones() Price getPrice(Zone) TarifSchedule * * Trip zone:Zone Price: Price

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 3 Classes  A class represent a concept  A class encapsulates state (attributes) and behavior (operations).  Each attribute has a type.  Each operation has a signature.  The class name is the only mandatory information. zone2price getZones() getPrice() TarifSchedule Table zone2price Enumeration getZones() Price getPrice(Zone) TarifSchedule Name Attributes Operations Signature TarifSchedule

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 4 Price Zone Associations  Associations denote relationships between classes.  The multiplicity of an association end denotes how many objects the source object can legitimately reference. Enumeration getZones() Price getPrice(Zone) TarifScheduleTripLeg * *

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 5 1-to-1 and 1-to-many Associations Country name:String City name:String Has-capital Polygon draw() Point x: Integer y: Integer One-to-one association One-to-many association * 1 1 1

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 6 From Problem Statement To Object Model Problem Statement: A stock exchange lists many companies. Each company is uniquely identified by a ticker symbol Class Diagram: StockExchange Company tickerSymbol Lists **

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 7 Aggregation  An aggregation is a special case of association denoting a “consists of” hierarchy.  The aggregate is the parent class, the components are the children class.  A solid diamond denotes composition, a strong form of aggregation where components cannot exist without the aggregate. (Bill of Material) TicketMachineZoneButton 3 Exhaust system Muffler diameter Tailpipe diameter Exhaust system Muffler diameter Tailpipe diameter

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 8 Inheritance  The children classes inherit the attributes and operations of the parent class.  Inheritance simplifies the model by eliminating redundancy. Button ZoneButtonCancelButton

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 9 Object Modeling in Practice: A Banking System Account Betrag Deposit() Withdraw() GetBalance() Customer Name CustomerId AccountId Bank Name 1) Find New Objects 2) Iterate on Names, Attributes and Methods 3) Find Associations between Objects Has 4) Label the assocations 5) Determine the multiplicity of the assocations *

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 10 Practice Object Modeling: Iterate, Categorize! Customer Name CustomerId() Account Amount Deposit() Withdraw() GetBalance() CustomerId AccountId Bank Name Has * * Savings Account Withdraw() Checking Account Withdraw() Mortgage Account Withdraw()

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 11 Packages  A package is a UML mechanism for organizing elements into groups (usually not an application domain concept)  Packages are the basic grouping construct with which you may organize UML models to increase their readability.  A complex system can be decomposed into subsystems, where each subsystem is modeled as a package DispatcherInterface Notification IncidentManagement

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 12 UML Sequence diagram: Terminology :LCDDisplay blinkHours() blinkMinutes() refresh() commitNewTime() :Time incrementMinutes() stopBlinking() :Watch pressButton1() pressButton2() pressButtons1And2() pressButton1() :WatchUser Object Message Activation Sequence diagrams represent the behavior as interactions Actor Lifeline

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 13 UML sequence diagrams  Used during requirements analysis  To refine use case descriptions  to find additional objects (“participating objects”)  Used during system design  to refine subsystem interfaces  Classes are represented by rectangles  Messages are represented by arrows  Activations are represented by narrow rectangles  Lifelines are represented by dashed lines selectZone() pickupChange() pickUpTicket() insertCoins() Passenger TicketMachine

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 14 Nested messages  The source of an arrow indicates the activation which sent the message  An activation is as long as all nested activations  Horizontal dashed arrows indicate data flow  Vertical dashed lines indicate lifelines selectZone() Passenger ZoneButton TarifScheduleDisplay lookupPrice(selection) displayPrice(price) price Dataflow …to be continued...

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 15 Creation and destruction  Creation is denoted by a message arrow pointing to the object.  Destruction is denoted by an X mark at the end of the destruction activation.  In garbage collection environments, destruction can be used to denote the end of the useful life of an object. Passenger ChangeProcessor …continued from previous slide... Ticket createTicket(selection) free() Creation Destruction print()

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 16 Iterations and Conditions  See Larman text: pp  Terminology  loop – iteration  opt – conditional (if)  alt – conditional (if/else)  ref – frame tag for another sequence diagram  sd – sequence diagram referred to in ref

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 17 Sequence Diagram Summary  UML sequence diagram represent behavior in terms of interactions.  Useful to find missing objects.  Time consuming to build but worth the investment.  Complement the class diagrams (which represent structure).