SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler

Slides:



Advertisements
Similar presentations
Object Design Examples with GRASP
Advertisements

Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Writing Use Cases: Requirements in Context
Use cases.
Object-Oriented Analysis and Design
Systems Analysis and Design in a Changing World, Fourth Edition
NJIT Use Case Model Operation Contracts Prepared By: Sumit Sharma.
Use Cases & Requirements Analysis By: Mostafa Elbarbary.
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Copyright ©2004 Cezary Z Janikow 1 Use Cases n Within Requirements discipline/workflow n Verbal descriptions of important functional (behavioral, transactional,
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
Use Case Model Operation Contracts Prepared By: Sumit Sharma and Sravanthi Gillala.
חוזים – Contracts 1. Larman – Chapter 10 – SSDs 10.2 What are System Sequence Diagrams? (introduction) Use cases describe how external actors interact.
The first step in getting what you want is to decide what you want.
Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative Development Part III Elaboration Iteration I – Basic1.
Chapter 7: The Object-Oriented Approach to Requirements
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Visualizing Concepts with a Domain Model.
ZEIT2301 Design of Information Systems Functional Design: Use Cases School of Engineering and Information Technology Dr Kathryn Merrick.
BTS430 Systems Analysis and Design using UML Domain Model Part 1—Finding Conceptual Classes.
Object Oriented Analysis and Design System Events & Contracts.
4 2009/10 Object Oriented Technology 1 Topic 4: The Object-Oriented Approach to Requirements Adopted from: Ch.7 The Object-Oriented Approach to Requirements.
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
Object-Oriented Analysis and Design An Introduction.
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Object Design Examples with GRASP (Ch. 18)
Use Case Model Operation Contracts Chapter 11 Applying UML and Patterns Craig Larman.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.
Approaching a Problem Where do we start? How do we proceed?
Review ♦ System sequence diagram ♦ Domain model
1 Lecture 6: Operation Contracts. 2 Overview  What is contract ?  The guidelines for writing contracts for the system operations.  Use Case realizations.
Operation Contracts: Getting ready to open the “System” black box All material from Applying UML and Patterns, 3 rd Edition, Craig Larman, chapter 11.
Chapter 9 Applying UML and Patterns -Craig Larman
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 1: Introduction to Use-Case Modeling.
♦ Use Case Model  Detailled use case - Important  Use case diagram- Refactoring Use case diagram  > 1 Last Lectures.
SYS466: Analysis and Design Using OO Models Domain Class Diagram.
Chapter 1 Applying UML and Patterns. The Need for Software Blueprints Knowing an object-oriented language and having access to a library is necessary.
Larman ch. 131 Use-Case Model : Adding Detail with operation contracts Larman ch. 13.
1 Capturing Requirements As Use Cases To be discussed –Artifacts created in the requirements workflow –Workers participating in the requirements workflow.
DOMAIN MODEL: ADDING ATTRIBUTES Identify attributes in a domain model. Distinguish between correct and incorrect attributes.
Chapter 11 Operation Contracts. What They Are An operation is a specification of a transformation or query that an object may be called on to execute.
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
Operation Contracts. Primary way to describe system behavior is with use cases Operation contracts provide more details in terms of state changes to objects.
Week 4 Operational Contracts Requirements to Design Logical Architecture.
Systems Analysis and Design in a Changing World, Fourth Edition
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.
Larman chapter 101 Domain Model: Visualizing concepts Larman chapter 10.
OO Methodology Elaboration Phase Iteration 1- Part 3.
Larman chapter 61 Use cases Larman chapter 6. 2 Fig. 6.1.
Summary from previous lectures
1 Chapter 9: Operation Contracts Chapter 13 in Applying UML and Patterns Book.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
Use-Case Model: Adding Detail with Operation Contracts.
1 Design Model Use-Case realizations with GRASP Larman chapter 17.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
1 Object Oriented Analysis and Design System Events & Contracts.
OO Methodology Elaboration Phase Iteration 1- Part 2.
Elaboration popo.
Chapter 9 Domain Models.
CMPE 280 Web UI Design and Development August 29 Class Meeting
System Sequence Diagrams and Operation Contracts
OO Domain Modeling With UML Class Diagrams and CRC Cards
Use Case Modeling.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Operation Contracts Ch. 11.
Domain Model: Visualizing Concepts
Use cases Dr. X.
Presentation transcript:

SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler

Week 5 Larman’s OO Development Process Requirements –Use cases, domain models, system operation

Objectives “Think in Objects” Analyze requirements with use cases Create domain models Apply an iterative & agile Unified Process (UP) Relate analysis and design artifacts Read & write high- frequency UML Practice Apply agile modeling Design object solutions –Assign responsibilities to objects –Design collaborations –Design with patterns –Design with architectural layers –Understand OOP (e.g., Java) mapping issues

Basic Questions What is software design? How is it different from software programming? Software development? How do we design software? What is the role of objects, layers, architecture,..? What is the role of tests, responsibilities, patterns, models, …? How does design fit into the software lifecycle? What is good design? How does software design differ from … design?

Larman’s Design Process

Artifacts in the UP Use-Case Model

DEFINITION: Use Case Informally, a use case is a story of using a system to fulfill a goal. –Rent Videos Used by primary actors –E.g., Clerk –External agents –something with behavior Use supporting actors. –CreditAuthorizationSystem

DEFINITION: Scenario Informally, a scenario is a specific sequence of actions and interactions in a use case. –One path through the use case. –E.g., The scenario of renting videos and first having to pay overdue fines. More formally, a use case is a collection of success and failure scenarios describing a primary actor using a system to support a goal.

Use Case Diagrams Warning: Don’t spend much time on diagramming. Use case work means to write text, not draw diagrams

Guidelines: Use Case Diagrams

Types of Actors Primary actor – has goal, initiates task Supporting actor – involved in dialogue, provide services or information Off-stage actor – has an interest in the use case

Guidelines: Use Case Modeling It is common to group CRUD (Create, Read, Update, Delete) operations into one use case. –Manage Users Name starts with a verb. –Manage Users All systems have a Start Up and Shut Down use case (perhaps trivial and low level). –But sometimes, important. an avionics system

Detail in Use Cases Iterative writing of use cases: idea, basics, scenarios, fully dressed description “brief” format = terse one-paragraph summary “casual” format = one informal paragraph per scenario “fully dressed” format = everything you want

Use Cases: non-functional requirements Note that use cases can capture non-functional requirements Performance: indicate performance constraints on individual scenarios Security: indicate which tasks must be secure Usability: indicate user characteristics with actor definitions; indicate frequency of user events with use case, … Portability, etc: These are “developer” use cases, not “user” use cases

DEFINITION: Essential & Concrete Use Cases “Keep the UI out” Essential use cases defer the details of the UI, and focus on the intentions of the actors. Essential: Clerk enters Customer ID. Concrete/worse: Clerk takes Customer ID card and reads the bar code with laser scanner.

GUIDELINES: Types of Scenarios Main scenario Alternative scenario – other ways of achieving the goal Exceptional scenario – where something goes wrong Recovery scenario – but we can recover Failure scenario – alas, we cannot recover NB For Larman, “failure scenario” = “exceptional scenario”

MOTIVATION: Comprehensible & Familiar Use cases are stories. A simple and familiar model that many people, especially non-technical, can easily relate to.

DEFINITION & MOTIVATION: Domain Model A Domain Model visualizes, using UML class diagram notation, noteworthy concepts or objects. –It is a kind of “visual dictionary.” –Not a picture of software classes. It helps us identify, relate and visualize important information. It provides inspiration for later creation of software design classes, to reduce “representational gap.”

Domain Model

Domain Model and Domain Layer Low representational gap

Conceptual classes Fig. 9.5

Guidelines 9.5 reuse existing model; use category list (see Table 9.1) identify noun phrases 9.9 Include Report Objects, eg Receipt 9.10 Think like a mapmaker 9.11 How to model the ‘unreal’ world 9.13 Description class, eg ProductDescription

GUIDELINES: Associations Only add associations for noteworthy relationships. Literally, those for which making a “note” is worthy or business motivated.

Associations See Table 9.2

UML and GUIDELINES: Attributes Show only “simple” relatively primitive types as attributes. Connections to other concepts are to be represented as associations, not attributes.

SSDs, System Operations & Layers

Context – Organisational iterative requirements use cases sys. sequence diagrams domain models

Context – System Subsystem User-level use cases User work tasks User goals for task (External) actor-system dialogue Target system being modeled is the whole system But … can model use cases of a subsystem … Subsystem as target system Means other subsystems are actors external to the subsystem Means that a client of the service of the subsystem is an actor (client is another subsystem …) Still have tasks, goals, scenarios, etc Can construct a use case model iterative requirements use cases sys. sequence diagrams domain models

Context within artefacts

Context with SSDs

Ch 11: Operation Contracts Aim: Define system operations via contracts Operation Method Invariant Precondition Postcondition

Definitions Contract A contract specifies detailed changes, as a result of a system operation, to objects in the domain model using pre-conditions and post-conditions. Contract Format –Operation: name and parameters of operation. –Cross References: use cases that involve the operation. –Preconditions: noteworthy assumptions about the state of the system or object in the domain model before execution of the operation. –Postconditions: The state of objects in the domain model after completion of the operation. State A state is the condition of an object (or system) at a moment in time.

Describing the State of a System Describe the objects in the system Describe the links (relationships) between the objects Describe the properties of each object (ie the state of the object) = the (abstract) values of the object attributes [as in a state machine]

Invariant of a System or Object Invariant Is a condition which is always true about the state of the system (or object) Note: the state is only defined in between execution of operations Hence, invariant only has to be true before and after each operation, not during an operation

Postcondition Definition The postconditions describe changes in the state of objects in the domain model. Domain model state changes include instances created, associations formed or broken, and attributes changed. Note: postconditions are not actions to be performed during the operation They are the effect, ie observations about state of domain objects when the operation is finished. Ie, “what” not “how”

Writing Postconditions Document 1.Instance creation and deletion “A SalesLineItem sli was created” 2.Attribute change of value “sli.quantity became quantity” Note: quantity is an operation parameter 3.Association links formed and broken “sli was linked to the current Sale” “sli was linked with a productDescription based on itemID match” Use past tense.

Guidelines 1.Identify system operations from the SSDs. 2.For system operations that are complex and perhaps subtle in their results, or which are not clear in the use case, construct a contract. 3.To describe the postconditions, document 1.Instance creation and deletion 2.Attribute modification 3.Links formed and broken Use past tense for postconditions. Remember to document the forming of links!