CompSci 280 S Introduction to Software Development

Slides:



Advertisements
Similar presentations
System Sequence Diagrams
Advertisements

Systems Analysis and Design 8th Edition
Interaction Diagrams Activity Diagram State Machine Diagram
Systems Analysis and Design in a Changing World, Fourth Edition
SE 555 Software Requirements & Specification 1 Activity Diagrams.
Lecture 11: Chapter 22 Topics –Object Oriented Modeling –UML –Use case.
C++ Training Datascope Lawrence D’Antonio Lecture 11 UML.
© Copyright Eliyahu Brutman Programming Techniques Course.
Lab 6 CPIT 250 System Analysis and Design.
System Analysis and Design
SE-565 Software System Requirements More UML Diagrams.
Coming up: Interaction Diagrams
SEQUENCE DIAGRAM Prepared by: T. Fatimah Alageel.
2005/05/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
UML Collaboration Diagram. Recap System Sequence Diagrams (SSD) UML for SSD Examples.
Class, Sequence and UML Model.  Has actors and use cases.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Prepared by: Sanaz Helmi Hoda Akbari Zahra Ahmadi Sharif University of Tech. Summer 2006 An Introduction to.
High-Level Design With Sequence Diagrams COMP314 (based on original slides by Mark Hall)
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 25. Review Design Level Class Diagram Identifying classes/Operations/Attributes Associations – Simple associations.
Computer Science 340 Software Design & Testing UML Sequence Diagrams.
1 Devon M. Simmonds University of North Carolina, Wilmington CSC450 Software Engineering WorkFlow Modeling with Activity Diagrams.
Systems Analysis & Design 7 th Edition Chapter 5.
Systems Analysis and Design 8 th Edition Chapter 6 Object Modeling.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
Software Engineering Lecture 10 UML vs. ERD.
Copyright © 2013 Curt Hill UML Unified Modeling Language.
1 System Analysis and Design Using UML INSTRUCTOR: Jesmin Akhter Lecturer, IIT, JU.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
OMT Modeling 1. Object Model : presented by the object model and the data dictionary. 2. Dynamic Model: presented by the state diagrams and event flow.
(14-2) UML Instructor - Andrew O’Fallon CptS 122 (December 2, 2015) Washington State University.
Systems Analysis and Design in a Changing World, Fourth Edition
Chapter 3: Introducing the UML
Introduction to Unified Modeling Language (UML) By Rick Mercer with help from The Unified Modeling Language User Guide, Grady Booch, James Rumbaugh, Ivar.
CHAPTER 6 OBJECT ANALYSIS.
GOVT. ENGINEERING COLLEGE, AJMER. A SEMINAR PRESENTATION ON UNIFIED MODELING LANGUAGE(UML) SUBMITTED TO:-PRESENTED BY:- Dr. REENA DADHICHPALLAVI VASHISTHA.
CompSci 280 S Introduction to Software Development
Introduction to UML.
Systems Analysis and Design in a Changing World, Fourth Edition
Business Process and Functional Modeling
CHAPTER
UML(Unified Modeling Language)
UML Diagrams By Daniel Damaris Novarianto S..
Component and Deployment Diagrams
The Movement To Objects
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
Standard UML: Communication and Dynamic Behavior
UML Modeling Sequence diagram
Unified Modeling Language
Introduction to Unified Modeling Language (UML)
University of Central Florida COP 3330 Object Oriented Programming
UML Diagrams Jung Woo.
CompSci 230 Software Construction
UML dynamic Modeling (Behavior Diagram)
IELM 511: Information System design
Unified Modeling Language
Week 12: Activity & Sequence Diagrams
Introduction to Unified Modeling Language (UML)
CIS 375 Bruce R. Maxim UM-Dearborn
Software Design Lecture : 15.
Sylnovie Merchant, Ph.D. MIS 161 Spring 2005
Chapter 5.
CIS 375 Bruce R. Maxim UM-Dearborn
Presentation transcript:

CompSci 280 S2 2107 Introduction to Software Development UML

Today’s Agenda Topics: Reading: Introduction Activity Diagram Object interaction diagrams Sequence Diagram Reading: Booch G.,The Unified Modeling Language User Guide, ch 19. Lecture09

UML Unified Modeling Language (UML) When creating complex OO systems, where do we start? When building complex systems, it might be worthwhile to plan things out before you start coding! When building a house, we usually have a set of plans. The UML is a standard notation for writing software blueprints UML is a language which allows us to graphically model an OO system in a standardised format. This helps us (and others!) understand the system. There are many different UML diagrams, allowing us to model designs from many different viewpoints. Roughly, there are Structure diagrams (documenting the architecture), e.g. class diagrams Behaviour diagrams (documenting the functionality), e.g. use-case diagrams Lecture09

1.Introduction UML Diagrams State Diagrams diagrams The UML is used to construct a model of a software system A model is a simplification of reality A model is thus an abstraction that exposes interesting properties while suppressing unnecessary detail A UML model comprises different diagrams, each focusing on a particular aspect of a system State Diagrams Class diagrams State Diagrams Use case diagrams State Diagrams Activity diagrams Model Component Diagrams Deployment diagrams State Diagrams Interaction diagrams Lecture09

1.Introduction UML diagram types Activity diagrams, which show the activities involved in a process or in data processing . Use case diagrams, which show the interactions between a system and its environment. Sequence diagrams, which show interactions between actors and the system and between system components. Class diagrams, which show the object classes in the system and the associations between these classes. State diagrams, which show how the system reacts to internal and external events. perspective Lecture09

6 Lecture09 Borrower Reserve book Borrow copy of book Return copy of book Update catalogue Librarian A Use Case diagram is user-centered and identifies system users (actors) and tasks. A Class diagram shows the static structure of a system in terms of classes, interfaces and their relationships. : LibraryMember theCopy : Copy borrow( theCopy ) : Book okToBorrow borrow borrowed An Interaction (sequence) diagram is concerned with dynamic behaviour and shows how objects exchange messages to fulfil a task. Not borrowable Borrowable returned( ) borrowed( ) [not last copy] borrowed( ) [last copy] A State diagram shows the states and transitions for an instance of particular class (Book in this case). : PC : Server servlet browser dbms <<http>> Internet LAN A Deployment diagram shows the deployment of software to hardware entities. 6 Lecture09

1.Introduction Tool Support: ArgoUML? You will draw some class diagrams and use-case diagrams. Options: ArgoUML Supports forward- and reverse-engineering. Class diagrams  Java skeletons. Java classes  class diagrams. Not on lab image – you’ll have to download and unzip the binary distribution in your echome directory (or on your USB pendrive) then double-click on argouml.jar (this is an “executable jarfile”). Any general-purpose drawing package (e.g. Visio) By hand: This is your only option during exams and tests You’ll have to scan your drawings into your assignments (which are submitted online) Lecture09

2.Activity Diagram Activity diagrams describe the workflow behavior of a system.  The diagrams describe the state of activities by showing the sequence of activities performed.  they can show activities that are conditional or parallel. Activity diagrams do not give detail about how objects behave or how objects collaborate. An activity is an ongoing, though interruptible, execution of a step in a workflow (such as an operation or transaction) Represented with a rounded rectangle. Text in the activity box should represent an activity (verb phrase in present tense). Lecture09

2. Activity Diagram How to Draw an Activity Diagram Diagrams are read from top to bottom and have branches and forks to describe conditions and parallel activities.  A fork is used when multiple activities are occurring at the same time.  A branch describes what activities will take place based on a set of conditions.  All branches at some point are followed by a merge to indicate the end of the conditional behavior started by that branch.  After the merge all of the parallel activities must be combined by a join before transitioning into the final activity state.    Lecture09

2.Activity Diagram Activity Diagram Example Fork Branch Start State Merge Join Activity End State Lecture09

3.Object Interaction Diagrams Object interaction diagrams show how class instances behave in terms of sending messages to one another This interactive behavior is represented in UML by two diagrams known as Sequence diagram and Collaboration diagram. The basic purpose of both the diagrams are similar. In UML, a sequence diagram is a popular form of interaction diagram where messages are time-ordered Interaction diagrams give a dynamic view of objects and show how they interact at run-time to fulfil a task Often used to model the way a use case is realized through a sequence of messages between objects. The purpose of Interaction diagrams is to: Model interactions between objects Assist in understanding how a system (a use case) actually works Verify that a use case description can be supported by the existing classes Identify responsibilities/operations and assign them to classes Lecture09

3.Object Interaction Diagrams Interaction diagram notation Key elements of interaction diagrams are objects and messages (method calls) Active Objects “Life line” appears below active objects to indicate their lifespan Messages Arrowed lines that indicated communication between objects Notations: An instance, named “object”, of an unspecified class An instance, named “object”, of a class named “Class” An unnamed instance of class “Class” Message m Message reply r (optional) Object lifeline Focus of control (optional) object object : Class : Class m r Lecture09

4.Sequence Diagram Objects & Messages an Order Line Objects: An object in a sequence diagram is rendered as a box with a dashed line descending from it. The line is called the object lifeline, and it represents the existence of an object over a period of time. Messages Messages are rendered as horizontal arrows being passed from object to object as time advances down the object lifelines. Conditions ( such as [check = “true”] ) indicate when a message gets passed Return: This arrow indicates a return from a previous message, not a new message. an Order Line a Stock Item [check = “true”] remove() check() Lecture09

4.Sequence Diagram Example: Time Increasing --> All lines should be horizontal to indicate instantaneous actions. Additionally if ActivityA happens before ActivityB, ActivityA must be above activity A Lecture09

4.Sequence Diagram Iterations an Order a Order Line Iteration: An iteration marker, such as * (as shown), or *[i = 1..n] , indicates that a message will be repeated as indicated. * prepare() Iteration marker Lecture09

Condition Object Message Iteration Self-Delegation Return Creation an Order Entry window an Order an Order Line a Stock Item A Reorder Item A Delivery Item new [check = “true”] new [needsToReorder = “true”] needsToReorder() [check = “true”] remove() check() * prepare() prepare() Object Message Iteration Return Creation Condition Self-Delegation [Fowler,97] Lecture09

5. Examples: Part of a Vending Machine Lecture09

Banking task: applying interest to a savings account Points to note: Sequence diagrams are time- ordered Actual arguments can include literals or references to participating objects driver : Customer : SavingsAccount balance : Money accounts( ) applyInterest( ) multiply( 0.08 ) create( ) interest : Money interest add( interest ) create( ) newBalance : Money newBalance create( Transaction.INTEREST, interest, this ) : Transaction Lecture09

Sequence Diagram Exercise: ATM Machine Draw a sequence diagram on cash withdrawal from ATM Lecture09