Software models and the Unified Modeling Language (UML)

Slides:



Advertisements
Similar presentations
© 2005 by Prentice Hall Appendix 3 Object-Oriented Analysis and Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
Advertisements

© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Object-Oriented Analysis and Design
© Copyright Eliyahu Brutman Programming Techniques Course.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Chapter 7: The Object-Oriented Approach to Requirements
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
CS 360 Lecture 6.  A model is a simplification of reality  We build models to better understand the system being developed.  We build models of complex.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Lecture 7 Object Oriented Design. Outline  What is UML and why we use UML?  How to use UML diagrams to design software system?  What UML Modeling tools.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
CS 3830 Day 15 Introduction 1-1. Announcements r Quiz 3: Wednesday, Oct 10 r Prog3 due (in 1DropBox) on Wednesday, Oct 10 r Prog4: m Parts A and B m Work.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 15 System Modeling with the UML.
EEL5881 Software Engineering I UML Lecture Yi Luo.
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
Class diagram Used for describing structure and behaviour in the use cases Provide a conceptual model of the system in terms of entities and their relationships.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
1 System Analysis and Design Using UML INSTRUCTOR: Jesmin Akhter Lecturer, IIT, JU.
SWT - Diagrammatics Lecture 4/4 - Diagramming in OO Software Development - partB 4-May-2000.
Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams.
Systems Analysis and Design in a Changing World, Fourth Edition
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
UML (Unified Modeling Language)
Chapter 3: Introducing the UML
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
Appendix Object-Oriented Analysis and Design: Use Cases and Sequence Diagrams Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F.
CS 501: Software Engineering Fall 1999 Lecture 15 Object-Oriented Design I.
Lecture 13. Unified Modeling Language (UML) The first applications you wrote in CS201 were easy to think out and code with no intermediate steps. Lab.
System modeling and the Unified Modeling Language (UML) CS
Chapter 5 – System Modeling Lecture 1 1Chapter 5 System modeling.
Chapter 5 – System Modeling
CompSci 280 S Introduction to Software Development
Systems Analysis and Design in a Changing World, Fourth Edition
Chapter 3 Transport Layer
Appendix 3 Object-Oriented Analysis and Design
UML(Unified Modeling Language)
UML Diagrams By Daniel Damaris Novarianto S..
UML-Class Diagrams. UML-Class Diagrams Order placement problem A Company has two types of customers, corporate customers and personal customers. All.
Chapter 5 System modeling
CMPE 280 Web UI Design and Development August 29 Class Meeting
Introduction to UML Majid Ali Khan Spring 2005 Introduce myself.
The Movement To Objects
Chapter 5 – System Modeling
Object-Oriented Analysis and Design
UML Modeling Sequence diagram
Unified Modeling Language
UML Diagrams Jung Woo.
System Modeling Chapter 4
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Business System Development
Introduction to UML Introduction to UML Shiyuan Jin September,23,2002
Chapter 20 Object-Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
CS310 Software Engineering Dr.Doaa Sami
Analysis models and design models
Copyright 2007 Oxford Consulting, Ltd
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Shiyuan Jin Fall, 2003 September,16,2003
CSE470 Software Engineering UML Lecture.  UML resource page
CS 425 Software Engineering
CS 425/625 Software Engineering
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Chapter 4 System Modeling.
Appendix A Object-Oriented Analysis and Design
Appendix 3 Object-Oriented Analysis and Design
Presentation transcript:

Software models and the Unified Modeling Language (UML) CS 560 Lecture 7

Models for requirements analysis and Specification A model is a simplification of reality We build models to better understand the system being developed. We build models of complex systems because we cannot comprehend such a system in its entirety.

Principles of software Modeling UML  “Unified Modeling Language” Used to describe a software system at a high level of abstraction. Serves as a bridge between the requirements specifications and the implementation. Requirements  Design/Model  Implementation Process and programming language independent. Industry-standard process for specifying, visualizing, and documenting information about software systems. Simplifies the complex process of software design.

Models: Diagrams and documentation in UML In UML, a model consists of a diagram and documentation. Diagram: Graphical representation of components used in the software system. Each diagram is supported by technical documentation that specifies the components represented. A diagram without documentation is of little value.

Types of UML Diagrams Use Case Diagrams Interactions between a system and its environment Class Diagrams Shows the object classes in the system and the associations between those classes Sequence Diagrams Interactions between actors and the system, and between system components State Diagrams Shows how the system reacts to internal and external events

Use Case Diagrams (Documentation) A use case is a model of the interaction between External users of a software product (actors) and The software product itself Describes a set of scenarios Captures user requirements Contract between client and software developers

Use Case Diagrams Actors: Use case: System boundary: A role that a user plays with respect to the system. Use case: A set of scenarios that describing an interaction between a user and a system. System boundary: rectangle diagram representing the boundary between the actors and the system.

Use Case Diagrams (Library) Boundary Actor Library System Borrow Library Clerk Book Borrower Order Title Fine Library Supervisor

Use Case Diagrams (Flight check-in) Boundary Actor

Class Diagrams (Documentation) A class diagram depicts classes and their interrelationships Used for describing structure in the use cases Used for requirement capture, end-user and component interaction Detailed class diagrams are used for developers Used for communicating software connections/requirements

Class Diagrams Each class is represented by a rectangle subdivided into three compartments: Name Attributes Operations Modifiers are used to indicate visibility of attributes and operations. ‘+’ is used to denote Public visibility ‘#’ is used to denote Protected visibility ‘-’ is used to denote Private visibility By default, attributes are hidden and (most) operations are visible.

Class Diagrams (bank account) Account_Name - Customer_Name - Balance +addFunds( ) +withDraw( ) +transfer( ) Attributes Class Name Operations

Class Diagrams Inheritance is a required feature of object orientation Supertype Example: Customer Regular Customer Loyalty Customer Subtype1 Subtype2 Inheritance is a required feature of object orientation Promotes code reuse and flexibility

Class Diagrams (shapes) Class Name Attributes Operations

Sequence Diagrams (Documentation) Used to model the interactions between the actors and the objects within a system. Shows the sequence of interactions that take place during a particular use case. Actors and components are listed along the top of the diagram, with a dotted line drawn vertically from these. Interactions between objects are indicated by arrows. Can be used to show time information/constraints

Sequence Diagrams (Telephone Call) Lifelines Caller Phone Recipient Message Picks up Dial tone Timing Constraint Dial Ring notification Ring Picks up Hello

Sequence Diagrams (Booking Website) Execution Specification

State Diagrams (documentation) Models the behavior of the system in response to external and internal events. Shows the system’s responses to stimuli often used for modeling real-time systems/components. Shows states as nodes, and events as edges between these nodes. When an event occurs, the system moves from one state to another.

State Diagrams (Traffic Light Example) Start Traffic Light State Red Transition Yellow timer expires Yellow Car trips sensor Green timer expires Green Event

Reliable data transfer sender rdt_send(data) rdt_rcv(rcvpkt) && ( corrupt(rcvpkt) || isACK(rcvpkt,1) ) sndpkt = make_pkt(0, data, checksum) udt_send(sndpkt) start_timer rdt_rcv(rcvpkt) L L Wait for call 0from above Wait for ACK0 timeout udt_send(sndpkt) start_timer rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && isACK(rcvpkt,1) rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && isACK(rcvpkt,0) stop_timer stop_timer Wait for ACK1 Wait for call 1 from above timeout udt_send(sndpkt) start_timer rdt_rcv(rcvpkt) L rdt_send(data) rdt_rcv(rcvpkt) && ( corrupt(rcvpkt) || isACK(rcvpkt,0) ) sndpkt = make_pkt(1, data, checksum) udt_send(sndpkt) start_timer L Transport Layer

Modeling tools: pseudo-code (Documentation) An informal modeling technique to show the logic behind part of a system. Example: University Admission Decision adminDecision (application) if application.SAT == null then error (incomplete) if application.SAT > S1 then accept(application) else if application.GPA > G1 then accept(application) else if application.SAT > S2 and application.GPA > G2 then accept(application) else reject(application) Pseudo-code can be informal, or a standard used by a software development organization, or based on a regular programming language What matters is that its interpretation is understood by everybody involved.

Modeling tools: pseudo-code (Documentation) Example: Selection Sort for i  to n – 1 do min  i for j  i to n - 1 do if A[j] < A[min] then end for if min != i then swap A[i], A[min]

Prototyping models Prototyping is the most comprehensive of all modeling methods Validating requirements by building a system that demonstrates the functionality of key parts. Needs for software prototyping: Assess and better understand the requirements. Test feasibility without building the entire system. Allow stakeholders to be involved during design phase. Provides progress visibility.

Prototyping phases (Documentation)

Types of Prototyping Throw-away prototyping: Evolutionary prototyping: Objective: Provides a better understanding of poorly understood requirements. Demonstrate prototype with stakeholders to develop more detailed requirements documentation. Evolutionary prototyping: Deliver a working subsystem with detailed requirements documentation. Components are developed incrementally so that they can be modified based on feedback from stakeholders. Operational prototyping: Integration of throw-away and evolutionary prototyping.

Data dictionary (Documentation) Set of information describing content, format, and structure of data. Name (e.g., “vCounter") Brief definition (e.g., what is “vCounter") Where is it used (e.g., source, used by, etc.) How can it be modified? Exception handling May be combined with a glossary

Data dictionary