CS 451 Software Engineering

Similar documents
UML (Unified Modeling Language)

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh

Software Service Engineering

State Machine Diagrams

Chapter 10. Object-Oriented Analysis and Modeling Using the UML. McGraw-Hill/Irwin

Class diagrams. Modeling with UML Chapter 2, part 2. Class Diagrams: details. Class diagram for a simple watch

Meltem Özturan

Class diagrams. Modeling with UML Chapter 2, part 2. Class Diagrams: details. Class diagram for a simple watch

Course "Softwaretechnik" Book Chapter 2 Modeling with UML

CS 370 REVIEW: UML Diagrams D R. M I C H A E L J. R E A L E F A L L

Lab Manual. Object Oriented Analysis And Design. TE(Computer) VI semester

Modeling with UML. (1) Use Case Diagram. (2) Class Diagram. (3) Interaction Diagram. (4) State Diagram

MSc programme (induction week) Department of Informatics INTRODUCTION TO UML

Basic Structural Modeling. Copyright Joey Paquet,

12 Tutorial on UML. TIMe TIMe Electronic Textbook

06. Analysis Modeling

Solved Question Paper June 2017

7. UML Sequence Diagrams Page 1 of 1

Chapter 2, lecture 2 Modeling with UML

BASICS OF UML (PART-2)

Oral Questions. Unit-1 Concepts. Oral Question/Assignment/Gate Question with Answer

Design Patterns. Design Patterns

Chapter : Analysis Modeling

Object Relationships UML Class diagrams. Software Requirements and Design CITS 4401 Lecture 4

UML- a Brief Look UML and the Process

OO Techniques & UML Class Diagrams

STATE MACHINES. Figure 1: State Machines

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) MODEL ANSWER

Department of Industrial Engineering. Sharif University of Technology

SE Assignment III. 1. List and explain primitive symbols used for constructing DFDs. Illustrate the use of these symbols with the help of an example.

UNIT-4 Behavioral Diagrams

Chapter 2: The Object-Oriented Design Process

On to Iteration 3, and Activity Diagrams CSSE 574: Session 6, Part 1

Object-Oriented Systems Analysis and Design Using UML

Unified Modeling Language (UML)

Lesson 11. W.C.Udwela Department of Mathematics & Computer Science

Principles of Software Construction: Objects, Design, and Concurrency

BASICS OF BPMN BASIC BPMN SUBSET OKAY, SO WHAT DO I REALLY NEED TO KNOW? CHAPTER 2

Introduction to Software Engineering. 5. Modeling Objects and Classes

Object Oriented Modeling

Data and Process Modeling

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques. Fundamentals, Design, and Implementation, 9/e

Interactions A link message

Introduction To UML PART II State Diagrams

Component Design. Systems Engineering BSc Course. Budapest University of Technology and Economics Department of Measurement and Information Systems

ASSIGNMENT- I Topic: Functional Modeling, System Design, Object Design. Submitted by, Roll Numbers:-49-70

Unit Wise Questions. Unit-1 Concepts

CS487 Midterm Exam Summer 2005

Practical UML - A Hands-On Introduction for Developers

Lecture 5 STRUCTURED ANALYSIS. PB007 So(ware Engineering I Faculty of Informa:cs, Masaryk University Fall Bühnová, Sochor, Ráček

A - 1. CS 494 Object-Oriented Analysis & Design. UML Class Models. Overview. Class Model Perspectives (cont d) Developing Class Models

APPENDIX M INTRODUCTION TO THE UML

Engineering Design w/embedded Systems

Practical UML : A Hands-On Introduction for Developers

UML Fundamental. OutLine. NetFusion Tech. Co., Ltd. Jack Lee. Use-case diagram Class diagram Sequence diagram

Requests Charges. Librarian. University affiliated patrons students, faculty, staff. Media Center Staff

Introduction to Software Engineering. 6. Modeling Behaviour

Design Engineering. Dr. Marouane Kessentini Department of Computer Science

(C) 2010 Pearson Education, Inc. All rights reserved. Dr. Marenglen Biba

THE UNIFIED MODELING LANGUAGE

SOFTWARE ENGINEERING UML FUNDAMENTALS. Saulius Ragaišis.

CMPT 354 Database Systems I

CSE 403: Software Engineering, Spring courses.cs.washington.edu/courses/cse403/15sp/ UML Class Diagrams. Emina Torlak

Structured and Object Oriented Analysis and Design

CS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #5: Entity/Relational Models---Part 1

Chapter 4. Capturing the Requirements. 4th Edition. Shari L. Pfleeger Joanne M. Atlee

SE 1: Software Requirements Specification and Analysis

Software Engineering. Page 1. Objectives. Object-Behavioural Modelling. Analysis = Process + Models. Case Study: Event Identification

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)


Introducing the UML Eng. Mohammed T. Abo Alroos

Unified Modeling Language

From Analysis to Design. LTOOD/OOAD Verified Software Systems

Object-Oriented Software Engineering Practical Software Development using UML and Java

A l Ain University Of Science and Technology

+ Public - Private # Protected # Protected (Overridable) Static

Process Modeling. Chapter 7. Class 05: Process Modeling 1

Process Modeling. Business Process Example. Process Design

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques. Fundamentals, Design, and Implementation, 9/e

Goal: build an object-oriented model of the realworld system (or imaginary world) Slicing the soup: OOA vs. OOD

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 09/29/2015

UML 2.0 UML 2.0. Scott Uk-Jin Lee. Division of Computer Science, College of Computing Hanyang University ERICA Campus

Design and UML Class Diagrams

For 100% Result Oriented IGNOU Coaching and Project Training Call CPD TM : ,

Chapter 5: Structural Modeling

Vidyalankar. T.Y. Diploma : Sem. VI [IF/CM] Object Oriented Modeling and Design Prelim Question Paper Solution

Darshan Institute of Engineering & Technology for Diploma Studies

Object Oriented Design. Program Design. Analysis Phase. Part 2. Analysis Design Implementation. Functional Specification

Unified Modeling Language (UML) Class Diagram

More on the Chen Notation

What is a Class Diagram? A diagram that shows a set of classes, interfaces, and collaborations and their relationships

What is a Class Diagram? Class Diagram. Why do we need Class Diagram? Class - Notation. Class - Semantic 04/11/51

S T R U C T U R A L M O D E L I N G ( M O D E L I N G A S Y S T E M ' S L O G I C A L S T R U C T U R E U S I N G C L A S S E S A N D C L A S S D I A

Äriprotsesside modelleerimine ja automatiseerimine Loeng 7 Valdkonna mudel

BPMN Getting Started Guide

Object-Oriented Systems Development: Using the Unified Modeling Language

Requirements Engineering

UML Essentials Dynamic Modeling

SEEM4570 System Design and Implementation Lecture 11 UML

Developing Shlaer-Mellor Models Using UML

Transcription:

CS 451 Software Engineering Yuanfang Cai Room 104, University Crossings 215.895.0298 yfcai@cs.drexel.edu 1

Elaboration 2

Elaboration: Building the Analysis Model An analysis model provides a description of the required information, functional, and behavioral domains for a computer based system. An analysis model will change during the requirements gathering with some areas stable and others being volatile. There are many ways to represent the model. Software is not visualizable 3

Domain Analysis Sources of domain knowledge Technical literature Existing application Customer surveys Expert advice Current/future requirements 4

Analysis Modeling Goals Describe what the customer requires Establish a basis for the creation of a software design Define a set of requirements that can be validated once the software is built 5

Deeper understanding the requirements From SRS, e.g. use case scenarios: What are the entities in the system? Class diagrams Data-flow diagram How these entities interact with each other? Sequence diagram Activity diagram Swim lane diagram The behavior of a complex object State diagram 6

Analysis Modeling Approaches 7

Analysis Modeling 8

9

Scenario based modeling Use cases text Use case diagrams Activity diagram Visualizing the logic within a use case: scenarios Swim lane diagram Split activities among actors. 10

Scenario-based Modeling Write Use-Cases Develop an Activity Diagram 11

An Activity Diagram Similar to a flowchart: Round rectangles imply specific system functions Arrows represent flow through the system Diamonds depict a branching decision 12

Swim Lane Diagram Swim Lane Diagram Represents flow of activities indicating which actor has responsibility for the action. Responsibilities are represented as parallel segments that divide the diamond vertically, like the lanes in a swimming pool. 13

Class based modeling Class diagram Entities Attributes Behaviors 14

Elaborating Use Cases Each usage scenario implies a set of objects that are manipulated as an actor interacts with them 15

Elaborating Use Cases The behavior of a computer- based system can have a profound effect on the design that is chosen, therefore the analysis model must provide modeling elements that depict behavior: 16

Class-Based Modeling Class diagram for the system class 17

Class Diagram

Class name attributes operation s A class encapsulates state (attribute) and behavior (operations). Each attribute has a type. Each operation has a signature. The class name is the only mandatory information.

Generalization Generalization relationships denote inheritance between classes. The children classes inherit the attributes and operations of the parent class. Indicated by a hollow arrow

Association Indicated by a solid arrow line from the source class to the target class Can be bi-directional represented by lines without arrow heads Don t usually put the association down as an attribute in the class

Aggregation If the association conveys the information that one object is part of another object ( has-a ), but their lifetimes are independent (they could exist independently). Aggregation is stronger than association, unidirectional. There is a container and one or more contained objects. For example, we may say that a Department contains a set of Employees, or that a Faculty contains a set of Teachers. An aggregation relationship is indicated by placing a white diamond at the end of the association next to the aggregate class. 22

Composition Even stronger than aggregation is composition. There is composition when an object is contained in another object, and it can exist only as long as the container exists and it only exists for the benefit of the container. Examples of composition are the relationship Invoice-Invoice Line, and Drawing-Figure. A composition is shown by a black diamond on the end of association next to the composite class. An aggregation is a special form of association; composition is a stronger form of aggregation. Both aggregation and composition are a part-whole hierarchy. 23

Multiplicity

Candidate classes: Noun extraction Company XYZ has two types of customers, corporate customers and personal customers. All customers can place orders. Every order is placed by a customer.

Evaluating a Class/Class Diagram 1. Intention-revealing naming: Does the name of the object convey its abstractions? Does the abstraction have a natural meaning and use in the domain? 2. Single Responsibility: Do the name, main responsibility statement data and functions align???

Flow-Oriented Modeling Data Flow Diagrams show the input-process-output view of a system. DFD s are not part of UML, but a complement to UML. There is a natural tendency to show too much detail too soon. Start at a high level and work your way down one process at a time. 27

Flow-Oriented Modeling DFD for the SafeHome Security function 28

Flow-Oriented Modeling Level 1 DFD for SafeHome Security Function 29

Flow-Oriented Modeling Level 2 DFD that refines the monitor sensors process 30

Behavioral Models Sequence Diagram How the entities interact with each other For further design analysis State Diagram How a complex object behaves 31

UML Sequence Diagrams 32

UML Sequence Diagrams Used during requirements analysis To refine use case descriptions To find additional objects ( participating objects ) Used during system design to refine subsystem interfaces Performance analysis

A Sample Scenario A player rolls the dice and gets a 6. The player moves 6 cells. The player lands on a cell that is an un-owned property. The player s turn is over. Objects Player Dice Cell Property Not all nouns become objects such as turn

UML Sequence Diagrams Objects are represented by columns (first column is actor that initiates use case) Messages are represented by arrows Activations of an operation are represented by narrow rectangles Player Dice Cell Property rolldice DiceValue(6) MoveCell(6) isownedproperty(false) isownedproperty No significance to the horizontal orderings of the objects Return values are optionally indicated using a dashed arrow with a label indicating the return value Suggestion: not to indicate the return values when it is obvious what is being returned

Scenario A player rolls the dice and gets a 6. The player moves 6 cells. The player lands on a cell that is an un-owned property. The player s turn is over. Not all nouns become objects such as turn Player Dice Cell Property rolldice DiceValue(6) MoveCell(6) isownedproperty(false) isownedproperty

Conditional Logic If the player lands on a cell that is an unowned property, the player s turn is over. If the player lands on a cell that is owned, the player must pay rent to the owner of the property. Then, the player s turn is over. Player Dice Cell Property Owner rolldice DiceValue(n) MoveCells(n) [isownedproperty] isownedproperty(false) [else] isownedproperty(true,owner) PayOwner

UML State Diagram 38

State Diagram A state diagram (also called state machine diagram) depict the various states that an object may be in and the transitions between those states. Appropriate to be developed for complex objects. From UML Distilled (pp. 107-108): A lock in a haunted house: keep valuables in a safe that s hard to find To reveal the lock to the safe, I have to remove a strategic candle from its holder, but this will reveal the lock only while the door is closed. In the Wait state, if the candle is removed providing the door is closed, you reveal the lock and move to the Lock state. Once I can see the lock, I can insert my key to open the safe. For extra safety, I make sure that I can open the safe only if I re-place the candle first. If a thief neglects this precaution, I ll unleash a killer rabbit to him.

State Diagram From UML Distilled (pp. 107-108): A lock in a haunted house: keep valuables in a safe that s hard to find To reveal the lock to the safe, I have to remove a strategic candle from its holder, but this will reveal the lock only while the door is closed. In the Wait state, if the candle is removed providing the door is closed, you reveal the lock and move to the Lock state. Once I can see the lock, I can insert my key to open the safe. For extra safety, I make sure that I can open the safe only if I re-place the candle first. If a thief neglects this precaution, I ll unleash a killer rabbit to him.

States States are represented by the values of the attributes or data members of an object. Initial state state transition Terminal state

Transitions Transitions are the result of the invocation of a method that causes an important change in state. Each transition has a label that comes in three parts. All the parts are optional. trigger-signature [guard]/activity candle removed [door closed]/reveal lock The trigger-signature is usually a single event that triggers a potential change of state. Missing trigger-signature [rare] you take the transition immediately. The guard, if present, is a Boolean condition that must be true for the transition to be taken. Missing guard always take the transition. The activity is some behavior that s executed during the transition. Missing activity don t do anything during the transition.

activity: behavior that s executed during the transition trigger-signature: event that causes a potential change of state guard: Boolean condition that must be true for transition to happen

Rules for State Diagrams There is one initial state (can be multiple final states). Every state can be reached from the initial state. From each state, there must be a path to a final state. Every transition between states must be labeled with an event that will cause that transition. When an event occurs, you can take only one transition. If you have multiple transitions with the same event, the guards must be mutually exclusive. Transitions that are not shown are illegal OR show transitions that cause errors.