CSE 403, Spring 2008, Alverson Using UML to express Software Architecture.

Slides:



Advertisements
Similar presentations
UML an overview.
Advertisements

Modeling Main issues: What do we want to build How do we write this down.
Modeling Main issues: What do we want to build How do we write this down ©2008 John Wiley & Sons Ltd. vliet.
UML Class and Sequence Diagrams Violet Slides adapted from Marty Stepp, CSE 403, Winter 2012 CSE 403 Spring 2012 Anton Osobov.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
Design Patterns in Java Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
What is UML? A modeling language standardized by the OMG (Object Management Group), and widely used in OO analysis and design A modeling language is a.
© Copyright Eliyahu Brutman Programming Techniques Course.
CS 2511 Fall UML Diagram Types  2 Main Types Structure Diagrams ○ Class Diagrams ○ Component Diagrams ○ Object Diagrams Behavior Diagrams ○ Sequence.
UML a crash course Alex Lo Brian Kiefer. Overview Classes Class Relationships Interfaces Objects States Worksheet.
1 CSE 403 Design and UML Class Diagrams Reading: UML Distilled Ch. 3, by M. Fowler These lecture slides are copyright (C) Marty Stepp, They may not.
1 TCSS 360, Spring 2005 Lecture Notes Design Phase and UML Class Diagrams Relevant Reading: UML Distilled, Third Edition M. Fowler.
UML January 24, 2011 CSE 403, Winter 2011, Brun Design and UML Class Diagrams.
Unified Modeling Language
Unified Modeling Language(UML) BY
The Unified Modeling Language (UML) Class Diagrams.
CSCI-383 Object-Oriented Programming & Design Lecture 9.
CIT UPES | Sept 2013 | Unified Modeling Language - UML.
Introduction to the Unified Modeling Language “The act of drawing a diagram does not constitute analysis or design. … Still, having a well-defined and.
Unified Modeling Language, Version 2.0
Presented by: CHAN LAI SAN ( ) REBAH DAW SARREB ( ) FIDA AL-OBAISI ( ) 08 April 2008 (Tuesday 6pm – 7:30pm)
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 5: Modelling with Classes.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 15 System Modeling with the UML.
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
UML for OOADStefan Kluth 1 2UML for OOAD 2.1What is UML? 2.2Classes in UML 2.3Relations in UML 2.4Static and Dynamic Design with UML.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Advanced UML Class Diagrams.
Introduction to Unified Modeling Language (UML) By Rick Mercer with help from The Unified Modeling Language User Guide, Grady Booch, James Rumbaugh, Ivar.
UML Class Diagrams 1 These lecture slides are copyright (C) Marty Stepp, They may not be rehosted, sold, or modified without expressed permission.
An Introduction to the Unified Modeling Language
Design Jon Walker. More UML ● What is UML again?
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
CSE 403, Spring 2007, Alverson Using UML to express Software Architecture.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
CSE 219 Computer Science III UML. UML Diagrams UML - Unified Modeling Language UML diagrams are used to design object-oriented software systems –represent.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1 Unified Modeling Language, Version 2.0 Chapter 2.
INFSY 535.  Small systems  Larger systems 1.Understand the program requirement- what 3. Write and test each part (unit testing) 4. Maintenance 2. Specify.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
Chapter 3: Introducing the UML
CSCI 3428: Software Engineering Tami Meredith UML Unified Modeling Language.
Unified Modeling Language (UML)
Basic Characteristics of Object-Oriented Systems
UML. Model An abstract representation of a system. Types of model 1.Use case model 2.Domain model 3.Analysis object model 4.Implementation model 5.Test.
Introduction to Unified Modeling Language (UML) By Rick Mercer with help from The Unified Modeling Language User Guide, Grady Booch, James Rumbaugh, Ivar.
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.
Modeling with UML – Class Diagrams
Design and UML Class Diagrams
TCSS 305 (Stepp) OO Design with UML Class Diagrams
UML Diagrams: Class Diagrams The Static Analysis Model
Main issues: • What do we want to build • How do we write this down
Object-Oriented Analysis and Design
Unified Modeling Language—UML A Very Brief Introduction
Systems Analysis and Design With UML 2
Introduction to Unified Modeling Language (UML)
Lecture on Design Phase and UML Class Diagrams
University of Central Florida COP 3330 Object Oriented Programming
Introduction to Unified Modeling Language (UML)
UML: Unified Modeling Language
Introduction to Unified Modeling Language (UML)
Introduction to UML Sources:
Presentation transcript:

CSE 403, Spring 2008, Alverson Using UML to express Software Architecture

CSE 403, Spring 2008, Alverson Outline UML overview UML class diagrams Activity – Upod designs [Mon] UML sequence diagrams

CSE 403, Spring 2008, Alverson Readings Practical UML: A hands on introduction for developers If you want to learn more about UML, there are a number of UML books (and web tutorials) available, including “UML Distilled”, by Martin Fowler.

CSE 403, Spring 2008, Alverson UML In an effort to promote Object Oriented designs, three leading object oriented programming researchers joined ranks to combine their languages: o Grady Booch (BOOCH) o Jim Rumbaugh (OML: object modeling technique) o Ivar Jacobsen (OOSE: object oriented software eng) and come up with an industry standard [mid 1990’s].

CSE 403, Spring 2008, Alverson UML – Unified Modeling Language The result is large (as one might expect) o Union of all Modeling Languages  Use case diagrams  Class diagrams  Object diagrams  Sequence diagrams  Collaboration diagrams  Statechart diagrams  Activity diagrams  Component diagrams  Deployment diagrams  …. o But it’s a nice standard that has been embraced by the industry.

CSE 403, Spring 2008, Alverson UML class diagrams Does not include: details of how the classes interact with each other algorithmic details how a particular behavior is implemented UML class diagram : a picture of the classes in an OO system, their fields and methods, and connections between the classes that interact or inherit from each other

CSE 403, Spring 2008, Alverson Practice as we go Complete the templates for a o Square  Length  Perimeter  Area o Circle  Radius  Perimeter  Area

CSE 403, Spring 2008, Alverson Diagram of one class class name in top of box o use italics for an abstract class name o + > if an interface class attributes o should include all fields of the object operations / methods o may omit trivial (get/set) methods o should not include inherited methods

CSE 403, Spring 2008, Alverson Class attributes attributes (fields, instance variables) o visibility name : type [count] = default_value o visibility:+public #protected -private ~package (default) /derived o underline static attributes o derived attribute: not stored, but can be computed from other attribute values

CSE 403, Spring 2008, Alverson Class operations / methods operations / methods o visibility name (parameters) : return_type o visibility:+public #protected -private ~package (default) o underline static methods o parameter types listed as (name: type) o omit return_type on constructors and when return type is void

CSE 403, Spring 2008, Alverson Relationships btwn. classes generalization: an inheritance relationship (isa) o inheritance between classes o interface implementation association: a usage relationship (3 options) o dependency o aggregation (class is formed as a collection of others) o composition (variant of aggregation when a contained class will not exist without the container class)

CSE 403, Spring 2008, Alverson Generalization relationships generalization (inheritance) o hierarchies drawn top-down with arrows pointing upward to parent o line/arrow styles differ, based on whether parent is a(n):  class: solid line, black arrow  abstract class: solid line, white arrow  interface: dashed line, white arrow

CSE 403, Spring 2008, Alverson Association relationships association: an instance of one class must know about the other in order to do its work 1. multiplicity *  0, 1, or more 1  1 exactly 2..4  between 2 and 4, inclusive 3..*  3 or more 2. name (what relationship the objects have) 3. navigability (direction of a query, represented by a line between the objects no arrow if communication flows both ways)

CSE 403, Spring 2008, Alverson one-to-one each student must carry exactly one ID card one-to-many each student may have many classes Multiplicity of associations

CSE 403, Spring 2008, Alverson Back to our example Add a square-list class and associate it with a square Identify the multiplicity on the ends of the association *  0, 1, or more 1  1 exactly 2..4  between 2 and 4, inclusive 3..*  3 or more

CSE 403, Spring 2008, Alverson Association types aggregation: “contains” o symbolized by a clear white diamond pointing to the class containing the other class composition: “contained for only this purpose” o stronger version of aggregation o the parts live and die with the whole o symbolized by a black diamond pointing to the containing class dependency: "uses temporarily" o symbolized by dotted line 1 * ShoeStore aggregation NikeShoes Lottery Ticket Random dependency Finger Hand composition 5 1

CSE 403, Spring 2008, Alverson Composition/aggregation example If the movie theatre goes away so does the box office => composition but movies may still exist => aggregation

CSE 403, Spring 2008, Alverson Class diagram example Aggregation – Order class contains OrderDetail classes. Could be composition? No arrows; info can flow in both directions

CSE 403, Spring 2008, Alverson UML example #2 Let’s add the visibility attributes

CSE 403, Spring 2008, Alverson UML square Something seems wrong with the visibility and with the constructor type? generalization comment

CSE 403, Spring 2008, Alverson Shall we try a bigger design? CSRocks Inc. would like to create a simulation of a new kind of MP3 player, the "Upod”. Create a high level UML class diagram to show the relationships between the various components of the UPod. The MP3 player must contain the following: An external port for connecting to accessories, such as headphones A hard drive or flash memory for holding songs and videos An LCD display for showing videos and song sound-waves A set of input buttons (such as play, stop; skip), that allow the user to interact with the MP3 player An internal CPU to compute requests