249 Conceptual Design: UML Sequence Diagrams. 250 Object Responsibilities n Attributes - What I know about myself n Relationships - What I know about.

Slides:



Advertisements
Similar presentations
193 G 10. G 194 G G 10 G 197 G
Advertisements

© 2005 by Prentice Hall Appendix 3 Object-Oriented Analysis and Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
Week 2 The Object-Oriented Approach to Requirements
155 CONCEPTUAL DESIGN: PURPOSE, ACTORS, FEATURES, AND UML USE CASES.
Trichophyton rubrum An anthropophilic fungus, which has become the most common and widely distributed dermatophyte of humans. It frequently causes chronic.
#250.
UML an overview.
Karolina Muszyńska Based on:
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Object-Oriented Analysis and Design
Chapter 1 Object-Oriented System Development
Introduction To System Analysis and Design
Systems Analysis and Design in a Changing World, Fourth Edition
Object Oriented System Development with VB .NET
Basic OOP Concepts and Terms
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
SE-565 Software System Requirements More UML Diagrams.
Chapter 7: The Object-Oriented Approach to Requirements
CMIS 470 Structured Systems Design
Chapter 5: Specification Yuanfang Cai CS751 Jan 29, 2003.
Chapter 8: Modelling Interactions and Behaviour UML Activity Diagram
Intro to UML - OO Class Diagrams Week 5 CMIS570. Plan for Tonight Object terms Unified Modeling Language history Class Diagrams Intro to Oracle Oracle.
Systems Analysis and Design in a Changing World, Fifth Edition
Introduction To System Analysis and Design
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Systems Analysis and Design in a Changing World, 3rd Edition
Programming Logic and Design Fourth Edition, Comprehensive Chapter 15 System Modeling with the UML.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
ניתוח מערכות מידע 1 Unified Modeling Language (UML) § § The Unified Modeling Language (UML) is the industry-standard language for: Specifying, Visualizing,
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
Software Engineering Lecture 8 Object-Oriented Analysis.
Systems Analysis and Design in a Changing World, Fourth Edition
Week 04 Object Oriented Analysis and Designing. What is a model? A model is quicker and easier to build A model can be used in simulations, to learn more.
Chapter 3: Introducing the UML
Decision Trees Decision Tree template condition 1 rule 1 rule 2 rule n condition 2 rule 1 rule 2 rule n rule 1 rule 2 rule n rule 1 rule 2 rule n condition.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
CS 501: Software Engineering Fall 1999 Lecture 15 Object-Oriented Design I.
SWE 214 (071) Introduction to UML Slide 1 Introduction to UML.
Information System Analysis Object-Oriented Analysis & Design.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
1 An Overview of UML. 2 The Unified Modeling Language UML is a graphical language used by software engineers to model software systems during development.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
 Sequence Diagrams Introduction.  Sequence Diagrams  Review Schedule Sheridan.
Introduction to UML.
Systems Analysis and Design in a Changing World, Fourth Edition
Analysis Classes Unit 5.
UML Diagrams By Daniel Damaris Novarianto S..
Object-Oriented Analysis and Design
UML Modeling Sequence diagram
Unified Modeling Language
Dynamic Modeling of Banking System Case Study - II
Introduction to Unified Modeling Language (UML)
UML Diagrams Jung Woo.
Chapter 8: Modelling Interactions and Behaviour UML Activity Diagram
Software Design AITI GP John Paul Vergara.
Business System Development
Unified Modeling Language
Week 12: Activity & Sequence Diagrams
Introduction to the Unified Modeling Language
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Basic OOP Concepts and Terms
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Appendix 3 Object-Oriented Analysis and Design
Chapter 4 Sequence Diagrams
Presentation transcript:

249 Conceptual Design: UML Sequence Diagrams

250 Object Responsibilities n Attributes - What I know about myself n Relationships - What I know about other Classes and Objects n Operations - What I do

251 Operations n Synonyms: methods, functions & services n Definition: Actions performed to fulfill the purpose of the information system and meet the needs of the user. n Respond to an event that happens: n External events - business activities n Internal events - messages sent to accomplish an operations intended purpose

252 Types of Operations n Basic - implied or implicit (not listed) n create a new object n search for an object n get and set attribute values n connect and disconnect object associations n delete an object n Problem domain – specific to the domain being studied

253 Template ClassName operations attributes ClassName 1) basic operations 2) problem domain specific operations - inherited - local attributes - inherited - local you think.... Thinking…

254 Problem Domain Operations Example Student registerForCourse dropCourse requestTranscript payStudentFees etc... studentIDNumber studentName etc... next....Basic Services Examples...

255 NEW Operation Example Student attributes operations Student 1 Student 2 Student 3 Student attributes operations Student 1 Student 2 Student 3 Student 4 new Student before after Note: All basic operation examples are for illustration only as each implementation language handles them differently

256 SEARCH Operation Example #1 Student attributes operations Student 1 Student 2 Student 3 search[Student, studentIDNumber = ] Student attributes operations Student 1 Student 2 Student 3 StudentID Number:

257 SEARCH Operation Example #2 Student attributes operations Student 1 Student 2 Student 3 search[Student, studentName = Smith] Student 1 Student 2 Student 3 Student Name: Smith, Mary Student Name: Smith, John Student attributes operations

258 GET Operation Example Student attributes operations Student 1 Student 2 Student 3 telephone: (619) get[Student=Student2, telephone] result: telephone = (619)

259 SET Operation Example Student attributes operations Student 1 Student 2 Student 3 set[Student, telephone,(619) ] telephone: (619) Student attributes operations Student 1 Student 2 Student 3 telephone: (619) before after

260 CONNECT Operation Example StudentClub attributes operations ACM Club Beta Sigma Pi Club AITP Club connect[StudentClub=AITP Club, ClubMember=AITP-Student N] ClubMember attributes operations ACM-Student 1 ACM-Student N BSP-Student 1 BSP-Student N AITP-Student 1 AITP-Student N

261 DISCONNECT Operation Example StudentClub attributes operations ACM Club Beta Sigma Pi Club AITP Club disconnect[StudentClub=AITP Club, ClubMember=AITP-Student N] ClubMember attributes operations ACM-Student 1 ACM-Student N BSP-Student 1 BSP-Student N AITP-Student 1 AITP-Student N

262 DELETE Operation Example Student attributes operations Student 1 Student 2 Student 3 Student attributes operations Student 1 Student 3 delete[Student 2] before after

263 Problem Domain Operations n Come in all sizes and shapes n May be unique to the problem domain n Consider encapsulation and reuse when designing n Some respond to external events... n Others respond to internal events n Details of each operation are documented via UML diagrams and other techniques

264 Problem Domain Operation Example #1 Automobile beginningMileage endingMileage calculateMilesDriven calculateMilesDriven[VIN = 12345, totalMiles] VIN: ,489 17,924 calculateMilesDriven totalMiles = endingMileage - beginningMileage (sample): 435 = 17, ,489

265 Problem Domain Operation Example #2 Automobile rentalCharge salesTaxOwed salesTaxOwed[VIN = 12345, taxRate, totalTax] VIN: $ salesTaxOwed totalTax = rentalCharge X taxRate (sample): $21.62 = X.0775

266 Problem Domain Operation Example #3 Report vehiclesOverdueReport message sent to Automobiles checkReturnDate operation Automobile scheduledReturnDate checkReturnDate checkReturnDate[listOfVehicles] checkReturnDate For each Automobile If scheduledReturnDate less than Today send vehicle information message to overdueVehicleReport Endif End For Each (sample): VIN: scheduledReturnDate: 05/05/95 Todays Date: 04/30/95 overdue: No VIN: scheduledReturnDate: 04/28/95 Todays Date: 04/30/95 overdue: Yes (will be on report) etc....

267 Encapsulation and Reuse Operation Example Student addCourse NOTE: The addCourse service requests the assistance of each of the other services (which are either part of the Student Class or some other Class within the information system) in order to carry out its intended purpose. SomeOtherClass(es) enterStudentIDNumber validateIDNumber enterClassScheduleNumber validateClassScheduleNumber checkSeatAvailability checkStudentRestrictions reserveSeatInClass addCourse responds to external event; others respond to internal event

268 Finding Operations n Identifying events and associated operations n Identify Class states - attribute values n Identify needed messages n Specifying details of known operations

269 Describing Operation Details n UML Sequence Diagram n UML Collaboration Diagram n UML State Diagram n UML Activity Diagram n Structured English or Pseudocode n Decision Tables and Decision Trees

270 UML Sequence Diagram n Is an interaction diagram that emphasizes the time ordering of messages n Also referred to as a Scenario - how a use case is realized (enacted) n Graphically, it is a 2-dimensional table that shows objects arranged along the X-axis and messages, ordered in increasing time, along the Y-axis. Object1Object2ObjectN Message1() Message2() Message3() Message4()

[check=true] new() w: OrderEntryWindowo: Orderl: OrderLineItemi: StockItem e: Employee new() prepare() * prepare() check() [check=true] remove() needToReorder() [needToReorder=true] new() r: ReorderItem d: DeliveryItem UML Sequence Diagram (partial) (Adapted from Fowler, M., UML Distilled, Addison-Wesley, 1997, p. 104.) new() prepare() check() if check() true remove() needToReorder() if needToReorder() true new() endif new() endif

272 Classes from the UML Sequence Diagram OrderEntryWindow Order OrderLineItem StockItem ReorderItem DeliveryItem Boundary Class Problem Domain Classes new() etc… prepare() etc… prepare() etc… check() remove() needToReorder() etc… new() etc… new() etc…

273 UML Collaboration Diagram n Is an interaction diagram that emphasizes the structural organization of the objects that send and receive messages n Graphically, it is a collection of vertices and arcs n First, place objects as vertices; second, render the links that connect the objects as arcs; third, adorn the links with the numbered messages that objects send and receive n Optionally, can contain a path ( >, >, etc.) Object1 Object2ObjectN 1: Message() 2: Message() 3: Message() 4: Message()

274 UML Collaboration Diagram Create one of these and the other is Automatically created Collaboration Diagram

275 UML State Diagram UML State Diagram Template State 1 State 2 State 3 State n condition action (note: each arrow should be labeled condition - action)

276 UML State Diagram Example #1 A telephone answering machine example (incomplete) Idle Recording Outgoing Message Answering a Call Recording Incoming Message Rewinding Tape Playing Messages Record Button Pushed Phone Rings Caller Speaks End of message Play Messages Button Pushed

277 UML State Diagram Example #2 FlightLeg Seat AvailableLockedSold lock timed out unlock sold

278 UML Activity Diagram n Shows the flow from one activity to another. Activities result in actions n Can be attached to classes, interfaces, component nodes, use cases, collaborations, and operations n Is similar to a Data Flow Diagram (DFD) n Used mainly when behavior is complex n Approximates a visual programming language for the UML

UML Activity Diagram Example pick show schedule show publicize show sell tickets buy scripts and music hire artists build sets design lighting make costumes (fork) (activity) rehearse dress rehearsal perform (completion transition) (join) Adapted from: Rumbaugh, J, Jacobson, I. and Booch, G., The Unified Modeling Language Reference Guide, Addison-Wesley, 1999, p. 32

280 For each Automobile If scheduledReturnDate less than Today send vehicle information message to overdueVehicleReport Endif End For Each Structured English Example Automobile checkReturnDate checkReturnDate operation Structured English scheduledReturnDate Note: Structured English is often referred to as Pseudocode

281 Decision Tables Rules Conditions Actions etc etc etc.. Decision Table template

282 Decision Table Example #1 Rules Conditions Actions Percent >=90% 89% >= Percent >= 80% 79% >= Percent >= 70% 69% >= Percent >= 60% 59% >= Percent Grade = A Grade = B Grade = C Grade = D Grade = F YXYX YXYX YXYX YXYX YXYX Do the conditions cover all possible cases?

283 Decision Table Example #2 Rules Conditions Actions Registration Fee = 0? Payment Type Credit Card # Input? C.C. Expire Date Input? C.C. Cardholder Name Input? Bank Check Number Input? Remarks by User Input? Activate POST Button Deactivate POST Button ……... Y-----YXY-----YX N Cash - X N Check - Y - X N CrCd Y - X X……..

284 Decision Trees Decision Tree template condition 1 rule 1 rule 2 rule n condition 2 rule 1 rule 2 rule n rule 1 rule 2 rule n rule 1 rule 2 rule n condition n rule 1 rule 2 rule n rule 1 rule 2 rule n rule 1 rule 2 rule n rule 1 rule 2 rule n rule 1 rule 2 rule n rule 1 rule 2 rule n rule 1 rule 2 rule n rule 1 rule 2 rule n rule 1 rule 2 rule n action(s)

285 Decision Tree Example Percent >= 90%? YesGrade = A No 89% >= Percent >= 80%? YesGrade = B No 79% >= Percent >= 70%? Yes Grade = C No Etc... Do the conditions cover all possible cases?

286 When to use O-O Analysis, Design, & Programming? Graphical User Interfaces (GUI) Event-Driven Programming Heterogeneous Environments Distributed Environments More sophisticated applications Persistent Data requires: Audio Video Graphics Other non-row/column data Higher utilization of REUSE practice Etc...

287 Alternative O-O A, D, & P Strategies ANALYSIS DESIGN PROGRAMMING Structured Object Structured Object Structured Object Conventional 3-4GL Mixture - Conv/Obj. Object There are all kinds of variations on these or other strategies ODBMS, Relational, and Extended-Relational DBMS are options

288 Simula - late 1960s Smalltalk since 1970s; Xerox Star in 1981 Eiffel - Bertrand Meyer Delphi (Borland.Com or Inprise) Java (Sun) & Visual J Languages C++ (Borland, Microsoft) Objective C Ada Object Pascal Object COBOL Visual FoxPro Powerbuilder Visual Basic etc... OO PROGRAMMING: ROCK SOLID! Pure Enhanced Pure OOP versus enhanced deterministic languages

289