Using Diagrams to Represent Program Structure OMT and UML Some pictures and material are from “Design Patterns” by Gamma et al.

Slides:



Advertisements
Similar presentations
1 Behavioral Modeling Chapter 8. 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports business processes.
Advertisements

UML Class and Sequence Diagrams Violet Slides adapted from Marty Stepp, CSE 403, Winter 2012 CSE 403 Spring 2012 Anton Osobov.
Systems Analysis and Design in a Changing World, Fourth Edition
UML Overview Unified Modeling Language Basic Concepts.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
Unified Modeling Language (UML)
© Copyright Eliyahu Brutman Programming Techniques Course.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Sharif University of Technology1 Design and Use-case Realization Software Engineering Laboratory Fall 2006.
Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.
Unified Modeling Language
The Unified Modeling Language (UML) Class Diagrams.
CIT UPES | Sept 2013 | Unified Modeling Language - UML.
1 Chapter 2 (Cont.) The BA’s Perspective on Object Orientation.
Unified Modeling Language, Version 2.0
1 SYS366 Lecture Visual Modeling and Business Use Case Diagrams.
Lecture 3: Visual Modeling & UML 1. 2 Copyright © 1997 by Rational Software Corporation Computer System Business Process Order Item Ship via “ Modeling.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Wixom, and David Tegarden Chapter 8: Behavioral Modeling.
Behavioral Modeling Chapter 8.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design, 2 nd Edition Copyright 2003 © John Wiley & Sons, Inc. All rights reserved.
An Introduction to the Unified Modeling Language
TAL7011 – Lecture 4 UML for Architecture Modeling.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
BCS 2143 Object Oriented Design Using UML. Objectives Objects Interactions Finding Classes Relationship Between Classes Attribute and Operation Class.
Drawing System Sequence Diagrams
What is a Structural Model?
1 The Unified Modeling Language. 2 The Unified Modeling Language (UML) is a standard language for writing software blueprints. The UML may be used to.
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
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.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
Chapter 3: Introducing the UML
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
Appendix Object-Oriented Analysis and Design: Use Cases and Sequence Diagrams Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F.
TA: Shreya Rawal.  A use case is a description of a system’s behavior as it responds to a request that originates from outside of that system (Usually.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
1 Systems Analysis and Design Behavioral Modeling Chapter 8 (Last one before the Midterm!)
Systems Analysis and Design in a Changing World, Fourth Edition
CHAPTER
Unified Modeling Language (UML)
UML(Unified Modeling Language)
UML Diagrams By Daniel Damaris Novarianto S..
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
Object-Oriented Analysis and Design
Sequence Diagrams.
Unified Modeling Language
Introduction to Unified Modeling Language (UML)
Introduction to Unified Modeling Language (UML)
UML PPt by: Hong Qing Yu.
Sequence Diagrams.
Introduction to UML Introduction to UML Shiyuan Jin September,23,2002
The Basics of Class Diagrams for a single class
Object Oriented Analysis and Design
The Unified Modeling Language
IMPORTANT NOTICE TO STUDENTS:
Unified Modeling Language
CIS 375 Bruce R. Maxim UM-Dearborn
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
Software Design Lecture : 15.
Using Diagrams to Represent Program Structure
Introduction to UML Sources:
Design Yaodong Bi.
CIS 375 Bruce R. Maxim UM-Dearborn
Presentation transcript:

Using Diagrams to Represent Program Structure OMT and UML Some pictures and material are from “Design Patterns” by Gamma et al

Outline l why diagrams l diagram types l class diagram elements n class n aggregation n inheritance n instantiation l class diagram examples l object diagram l use case diagram l interaction diagram 2

Why Diagrams l diagrams is a way to capture the essential aspects of the program n have an overview of the whole program n see the important relationships between elements of program n get the picture of the program before it is coded l standardized as part of n object modeling technique (OMT) – Rumbaugh, Blaha, et al 1991 n universal modeling language (UML) – Rational Rose Inc. and other companies l used in program planning, development and documentation l language independent (not necessarily C++) 3

Diagram Types l structure diagram – emphasizes what constructs must be present in the modeled system n class diagram – the system classes, attributes, their relationships n object diagram – a view of the modeled system at a specific execution instance l behavior diagram – emphasizes what actions must happen in the system n use-case diagram – system functionality in terms of interaction with outside actors n interaction diagram – flow of control and data among constructs 4

Classes l operations – member functions/methods l instance variables – member variables/attributes class Example{ public: void showchar(); string getstring(); private: char c; string str; }; class BankAccount{ public: void deposit(dollars amount); void withdrawal(dollars amount); private: string owner; dollars balance; }; Example showchar(): void getstring(): string c: char str: string ClassName oper2(): returnType oper1(parName: parType): rType instVar1: Type instVar2: Type 5

Aggregation l if class contains instances (objects) of other classes the class aggregates them l if class aggregates more than one instance of the same class it is shown diagramatically l multiplicity - shows how many instances of objects on each side 6

Inheritance, Reference and Instantiation Class inheritance l class contains a reference to another l object creation (class instantiation) is done by a method of another class Additional comments 7

Visibility - private member + public member 8

Example Class Diagram 1 9

Example Class Diagram 2 10

Example Class Diagram 3 l blah 11

Object Diagram l shows objects and references as the program is executed l what would be a class and an object diagram for an object with dynamically allocated members? 12

Use Case Diagrams l written description of the system’s behavior regarding tasks or requirements l captures interactions between actors (outside entities) and the system through use cases use case actor 13

Interaction (Sequence) Diagram l shows order in which requests (methods) between objects are executed - scenario, typically within a single use case n boxes – processes (function invocation) in each object n lines – messages (interaction) between objects n lifeline – vertical dashed line represents objects’ existence 14

Interaction Diagram Examples 15

Interaction Diagram Examples 2 16

Questions on Diagrams l What is the purpose for the use of diagrams l What is the difference between structure and behavior diagrams? l What types of structure diagrams we have studied? Behavior diagrams? l How is class denoted on a structure diagram? l What is aggregator/agregatee? How is their relationship denoted? l What is multiplicity and how is it denoted? l What is visibility and hwo is it denoted? l How are objects denoted on an a structure diagram? l What diagram uses use cases, actors? What is system boundary? l What do boxes and lines and crosses represent in a flow diagram? 17

Battleship Class and Object Diagrams 18

Battleship Use Case and Interaction Diagrams 19