Object-Oriented Architecture & Design – Lecture 2 (of 3) UML in Depth David Woollard University of Southern California Computer Science Department Software.

Slides:



Advertisements
Similar presentations
© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Advertisements

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
2008/03/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Object-Oriented Analysis and Design
Systems Analysis and Design in a Changing World, Fourth Edition
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
SE 555 Software Requirements & Specification1 Use-Case Modeling: Overview and Context.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
© Copyright Eliyahu Brutman Programming Techniques Course.
Sharif University of Technology1 Design and Use-case Realization Software Engineering Laboratory Fall 2006.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
Team Members Rachid Alaoui Medarhri (Senior Student). Tarek Bougroug (Senior Student). Supervised By : Dr. Driss Kettani.
UML exam advice. Minimal, yet sufficient UML course 80% of modeling can be done with 20% of the UML. Which 20% was that again? We’re supposed to be “Use.
1 Business Models Modeling. 2 Why Model the Business Business modeling is a technique to help answer critical questions, such as: What do the workers.
Object Oriented Analysis and Design Using the UML
Object-Oriented Architecture & Design – Lecture 3 (of 3) Advanced Topics David Woollard University of Southern California Computer Science Department Software.
Business Modeling Domain Modeling Source: Use Case Driven Object Modeling with UML – A Practical Approach By Doug Rosenberg ISBN:
Chapter 7: The Object-Oriented Approach to Requirements
Copyright 2001 ICONIX Software Engineering, Inc. 1 UML for e-Commerce Doug Rosenberg ICONIX Software Engineering, Inc.
Software Engineering 8. System Models.
The Design Discipline.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
CMIS 470 Structured Systems Design
University of Southern California Center for Systems and Software Engineering CS577a: Understanding the SSAD, Use-Cases and GUI Prototyping David Klappholz,
Chapter 4 System Models A description of the various models that can be used to specify software systems.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
Software Engineering Design & Modelling
Use Cases 1. Last week  Introduction to software engineering  How is it different from traditional engineering?  Introduction to specification  Operational.
Key Takeaway Points A use case is a business process; it begins with an actor, ends with the actor, and accomplishes a business task for the actor. Use.
Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 10 Use Case Design.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Chapter 7 System models.
System models l Abstract descriptions of systems whose requirements are being analysed.
Pertemuan 19 PEMODELAN SISTEM Matakuliah: D0174/ Pemodelan Sistem dan Simulasi Tahun: Tahun 2009.
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
Systems Analysis and Design in a Changing World, 3rd Edition
Faculty of Computer & Information
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
UML Use Case Diagramming Guidelines. What is UML? The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing,
1 אירוע אמאזון. 2 שלבי הפיתוח עם דיאגרמות UML 3 אמאזון תרשים תוכן.
University of Southern California Center for Systems and Software Engineering CS577a: Sequence Diagrams and ‘Design Classes’ David Klappholz, Nupul Kukreja.
1 Object-Oriented Modeling Using UML CS 3331 Section 2.4 Modeling Requirements with Use Cases.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
(c) Addison Wesley Copyright © 2000 by Addison Wesley Version 1.0
Analysis Modeling CpSc 372: Introduction to Software Engineering
Systems Analysis and Design in a Changing World, Fourth Edition
Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design.
Analysis Yaodong Bi. Introduction to Analysis Purposes of Analysis – Resolve issues related to interference, concurrency, and conflicts among use cases.
UML - Development Process 1 Software Development Process Using UML.
Use Case Diagram Lecture # 1. Use Case Diagram Use-cases are descriptions of the functionality of a system from a user perspective.  Depict the behaviour.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
McGraw-Hill/Irwin© 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 17 Object-Oriented Design and Modeling Using the UML.
University of Southern California Center for Systems and Software Engineering CS577a: Use-Case Analysis and Workshop 10/12/2009© USC-CSSE David.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
Use Case Diagrams A Detailed Description. Use Case Diagrams Use case diagrams describe relationships between users and use cases A use case is a (usually.
Engineering, 7th edition. Chapter 8 Slide 1 System models.
Business Models Modeling.
Analysis models and design models
Rational Rose 2000 Instructor Notes Use Case Realization Structure
Design Yaodong Bi.
Presentation transcript:

Object-Oriented Architecture & Design – Lecture 2 (of 3) UML in Depth David Woollard University of Southern California Computer Science Department Software Architecture Group California Institute of Technology NASA Jet Propulsion Laboratory Data Management Group

Story Arc Storyline in episodic form Goal for OOA&D: Move from requirements to design, reified by a model OOA&D will be split across 3 lectures – Lecture 1: Problem Decomposition (9/15) – Lecture 2: UML in Depth (9/29) – Lecture 3: Advanced Topics – NFP, Incomplete Specification, Relationship to Frameworks, etc. (10/1) OOA&D Workshop (10/11) – Interactive session to review your designs 2

From Last Time OO is a useful design construct OO has a place in Architecture, but Architecture is a lot larger than OO Design is an iterative process – Requirements imply other missing requirements – Requirements conflict with other requirements – Requirements can be non-functional and imply levels-of-service Would an Internet bookstore designed to service 100 customers have a different architecture from an Internet Bookstore designed to support 100 Million? Domain Modeling is a useful activity to flesh out requirements and design concerns as well as standardize on language 3

Outline for Today Now that I have some designs in mind, how do I capture them? – Use Case Diagrams – Sequence Diagrams – Class Diagrams – Deployment Diagrams Assignment Specifics 4

Why UML Started in 1994, led by Rational Software Corporation, fused a number of modeling approaches – Booch Technique – Object Modeling Technique – Object-Oriented Software Engineering Extensive industry adoption Significant tool support Not the only ADL, but usually a decent choice 5

Example – Internet Bookstore Online retail outlet for purchasing books Provide basic user capabilities for: – Searching for books – Reviews & rating of books – Purchase of books Interfaces to shipping and inventory management 6

Internet Bookstore Requirements (1/2) The bookstore shall accept orders over the internet The bookstore shall maintain a list of accounts for up to 1,000,000 customers The bookstore shall provide password protection for all accounts The bookstore shall provide the ability to search the master book catalog The bookstore shall provide a number of search methods on that catalog, including search by author, search by title, search by ISBN number, and search by keyword The bookstore shall provide a secure means of allowing customers to pay by credit card 7

Internet Bookstore Requirements (2/2) The bookstore shall provide a secure means of allowing Customers to pay via purchase order The bookstore shall provide a special kind of account that is pre-authorized to pay via purchase order The bookstore shall provide electronic links between the Web and the book information database (BID) and the shipping fulfillment center The bookstore shall maintain reviews of books and should allow anyone to upload review comments The bookstore shall maintain ratings on books based on customer inputs 8

Log-in Use Case 1.The Customer clicks the Login button on the Home Page. 2.The system displays the Login Page. 3.The Customer enters his or her user ID and password and then clicks the Login button. 4.The system validates the login information against the persistent Account data and then returns the Customer to the Home Page. 9

Use Case Basics The purpose of Use-Case Design is to discover the necessary: – Interface Objects & their classes e.g. pages, dialog boxes, representations of entities – Entity Objects & their classes Both temporary & persistent, e.g., data structures, DB tables, etc – Control Objects & their classes We’ll see examples on later slides – You know what an Interface Class is & what an Entity Class is, so don’t worry if you don’t yet know what a Control Class is (you’ll find out soon) – The messages they exchange 10

UML Use-Case Symbols Interface Classes are labeled with: – These objects interact with actors in the use-case Entity Classes are labeled with: – These are data classes Control Classes are labeled with: – These can be thought of as activity or control flow classes Actors in the use-case are labeled with: 11 NOTE: Don’t get caught up on diagram specifics

Use-Case: Step 1 Step 1: The Customer clicks the Login button on the Home Page 12 Step 1: The Customer clicks the Login button on the Home Page Q. Why did we not explicitly model the login button? Short Answer: Judgment call Longer Answer: “Click log In” is a simple behavior, the whole of which can be conveyed simply.

Use-Case: Step 2 The system displays the Login Page. 13 A good intuitive understanding of Control Objects is that they will ultimately become methods

Use-Case: Step 3 The Customer enters his or her user ID and password and then clicks the Login button. 14

Use-Case: Step 4 The system validates the login information against the persistent Account data and then returns the Customer to the Home Page. 15

But what about off-nominal cases? 16

Log-in Use Case Alternatives If the Customer clicks the New Account button on the Login Page, the system invokes the Open Account Use-Case. If the Customer clicks the Password Reminder button on the Login Page, the system displays the reminder word stored for that Customer, in a separate dialog box. When the Customer clicks the OK button, the system returns the Customer to the Login Page. If the Customer enters a user ID that the system does not recognize, the system displays a message to that effect and prompts the Customer to either enter a different ID or click the New Account button. If the Customer enters an incorrect password, the system displays a message to that effect and prompts the Customer to reenter his or her password. If the Customer enters an incorrect password three times, the system displays a page telling the Customer that he or she should contact customer service, and also freezes the Login Page. 17

Use-Case: Alternative 1 If the Customer clicks the New Account button on the Login Page, the system invokes the Open Account Use-Case. 18 Illustration of hierarchical Use-case composition.

Use-Case: Alternative 2 If the Customer clicks the Password Reminder button on the Login Page, the system displays the reminder word stored for that Customer, in a separate dialog box. 19 I’ll leave the rest of the alternatives to you as an exercise.

Search by Author Use Case The Customer types the name of an Author on the Search Page and then presses the Search button. The system ensures that the Customer typed a valid search phrase, and then searches the Catalog and retrieves all of the Books with which that Author is associated. Then the system retrieves the important details about each Book, and creates a Search Results object with that information. Then the system displays the list of Books on the Search Results Page, with the Books listed in reverse chronological order by publication date. Each entry has a thumbnail of the Book's cover, the Book's title and authors, the average Rating, and an Add to Shopping Cart button. The Customer presses the Add to Shopping Cart button for a particular Book. The system passes control to the Add Item to Shopping Cart Use-Case. 20

Search by Author Alternatives If the Customer did not type a search phrase before pressing the Search button, the system displays an error message to that effect and prompts the Customer to type a search phrase. If the system was unable to find any Books associated with the Author that the Customer specified, the system displays a message to that effect and prompts the Customer to perform a different search. If the Customer leaves the page in a way other than by pressing an Add to Shopping Cart button, the system returns control to the Use-Case from which this Use- Case received control. 21

Search by Author Use-Case Diagram 22

Sequence Diagram Basics Top Elements – Classes in the eventual design – Actors, Interface Classes, Entity Classes Left Elements – Use Case Description Arrows indicate Messages – What the methods should be – Which object each method should belong to – Which object(s) calls which method, and at exactly what point during the course of the Use-Case 23 Use Case Description

Log In Sequence Diagram 24

Class Diagrams Some of your objects will be implemented as classes Each class consists of three elements: – name – attributes – Operations Relationships between classes: 25

Class Relationships Association – Binary association – N-ary association – One-way navigation – Named association – Association by roles – Association multiplicity Aggregation – Basic aggregation – Multiple aggregation – Self-aggregation – Composition Generalization – Basic generalization – Multiple generalization (Powertype) Dependency – Basic dependency – Usage dependency – Creation dependency – Instantiation dependency – Abstraction dependency – Derivation dependency – Realization dependency – Refinement dependency – Trace dependency – Permission dependency – Substitution dependency 26 Some Advice: For the purposes of your assignments in this class, stick to the basics: - Binary, N-ary associations w/ multiplicity - Basic aggregation/composition - Basic dependencies Remember, it’s a model of your system…

Deployment Diagrams Deployment diagrams show the relationship between the hardware and software components in the system 27 Typically not very useful for 577 projects, but useful to Understand for more complex, Distributed systems.

Context Diagrams Show a system’s external interfaces. 28 From Agile Modeling: Effective Practices for Extreme Programming and the Unified Process by Scott Ambler.

ARB Specifics In the first ARB (10/18-10/22), you will need to generate the following: – System Analysis Artifacts and Information Model Use-Case Model System Context Model – Design Model Initial Design At the very least, a deployment diagram 29

Artifacts and Information Model Primary documentation of Entity Classes Use Class Diagrams to model the Entity classes Similar to E-R diagram Ultimately, we will use these diagrams to develop the persistence layers in the system 30

Use Case Models Capture all nominal cases Keep the specification to a high level Alternatives for primary use-cases Show hierarchical relationships 31

Context Diagram Basically just as advertised Show the hierarchy of the user classes and how they interact with the system 32

Rationale Tutorial & Workshop Tip will be holding tutorials on using Rational software in the next week – Please attend if you are unfamiliar On 10/11, we will be holding a design workshop – Bring in your designs prior to ARB – We can provide feedback on: Scope Detail Modeling nomenclature 33

Conclusions UML is an industry standard for documenting software system design UML is a LARGE standard (I’m being polite), so this lecture is intended to be an introduction, not a comprehensive guide Use-cases help designers to: – Create sequence diagrams – Tease out objects that will be implemented as classes – Understand class methods Rationale tutorial and the design workshop will help to flesh out your designs prior to the ARB 34