Solving the Problem Analysis & Design.

Slides:



Advertisements
Similar presentations
Use Case & Use Case Diagram
Advertisements

Object Design Examples with GRASP
Use cases.
COMP 350: Object Oriented Analysis and Design Lecture 3 Case Studies, Inception & Use Cases References: Craig Larman Chapters 3-6.
Introduction To System Analysis and Design
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Object Oriented Analysis Process
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Software Engineering CSE470: Requirements Analysis 1 Requirements Analysis Defining the WHAT.
Copyright ©2004 Cezary Z Janikow 1 Use Cases n Within Requirements discipline/workflow n Verbal descriptions of important functional (behavioral, transactional,
NJIT 1 Domain Model Visualizing Concepts Chapter 9 Applying UML and Patterns Craig Larman.
Introduction to Software Engineering Dr. Basem Alkazemi
Object Interaction Modeling
Use Case Modeling. Kendall & Kendall© 2005 Pearson Prentice Hall18-2 Commonly Used UML Diagrams The most commonly used UML diagrams are: – Use case diagram,
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 More on use cases System sequence.
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 Use cases: deciding what you want.
UML exam advice. Minimal, yet sufficient UML course 80% of modeling can be done with 20% of the UML. Which 20% was that again? We’re supposed to be “Use.
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
9/18/011 Software Requirements Analysis and Design (Continued)
Domain Modeling (with Objects). Motivation Programming classes teach – What an object is – How to create objects What is missing – Finding/determining.
The first step in getting what you want is to decide what you want.
TK2023 Object-Oriented Software Engineering CHAPTER 6 SYSTEM SEQUENCE DIAGRAMS.
Introduction To System Analysis and design
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
What is a domain model? “A domain model captures the most important types of objects in the context of the business. The domain model represents the ‘things’
1 © 2005 course technology University Of Palestine Chapter 6 Storyboarding the User’s Experience.
Last lecture. What is a Use Case Use cases are stories (scenarios) of how actors use (interact with) the system to fulfill his goal. Examples Process.
1 Unified Modelling Language OOA/OOD a summary of the book: Applying UML and Patterns, Craig Larman D. Dranidis October 2000 CITY College.
DOMAIN MODEL— PART 2: ATTRIBUTES SYS466. Looking For Potential Classes “Know the business”. Ask Questions Identify business concepts; filter nouns (person,
Object Oriented Analysis and Design System Events & Contracts.
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.
© 2005 course technology1 1 1 University Of Palestine UML for The IT Business Analyst A practical guide to Object Oriented Requirement Gathering Hoard.
Sept Ron McFadyen1 Section 10.1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 20. Review Software Requirements Requirements Engineering Process.
USE CASE Bayu Adhi Tama, MTI Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto
Approaching a Problem Where do we start? How do we proceed?
Review ♦ System sequence diagram ♦ Domain model
Object-Oriented Design Part 2
Faculty of Computer & Information
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Conceptual Modeling Modeling the Problem Domain. Conceptual Modeling Decompose problem space into comprehensible concepts. Clarify the terminology or.
Chapter 9 Applying UML and Patterns -Craig Larman
1 Object-Oriented Modeling Using UML CS 3331 Section 2.4 Modeling Requirements with Use Cases.
Conceptual Model or Domain Models Chapter10 Applying UML and pattern.
1 What is OO Design? OO Design is a process of invention, where developers create the abstractions necessary to meet the system’s requirements OO Design.
Business Analysis with For PG MDI, Gurgaon Kamna Malik, Ph.D.
CIS 112 Exam Review. Exam Content 100 questions valued at 1 point each 100 questions valued at 1 point each 100 points total 100 points total 10 each.
Requirements specification Why is this the first major stage of software development? –Need to understand what customer wants first Goal of requirements.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
PRESENTATION ON USE CASE. Use Case Modeling Use case diagrams describe what a system does from the standpoint of an external observer. The emphasis is.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
Understanding Requirements
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
DOMAIN MODEL—PART 2: ATTRIBUTES BTS430 Systems Analysis and Design using UML.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
1 Object Oriented Analysis and Design System Events & Contracts.
Elaboration popo.
CMPE 280 Web UI Design and Development August 29 Class Meeting
System Sequence Diagrams and Operation Contracts
UML Use Case Diagrams.
DESIGN MODEL: USE-CASE REALIZATIONS WITH GRASP PATTERNS
OO Domain Modeling With UML Class Diagrams and CRC Cards
Start at 17th March 2012 end at 31th March 2012
Requirements Management
Using Use Case Diagrams
Copyright 2007 Oxford Consulting, Ltd
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Software Requirements
Presentation transcript:

Solving the Problem Analysis & Design

Requirements Phase Requirements -- should be an unambiguous description of the external behavior of the system to be built Typical problems : Contains embedded design decisions (How vs. What). Vague (must be measurable / testable) Computer industry language (instead of user's language) Requirements are not traceable to the system developed

Analysis Phase Discover and understand the problem domain Object-oriented Analysis decompose a problem by selecting relevant concepts from the vocabulary of the domain. Develop a Conceptual Model include class and interaction diagrams.

Conceptual Model contains important real-world concepts and associations in the vocabulary of the problem domain: includes objects, roles, events, interactions becomes the foundation for the class model

Use Cases A purposeful user interaction with a system A narrative description of a sequence of actions required to produce something of value to an actor or organization

Use Cases describe functional requirements of the system give a clear description of needed system behavior help customer and developer agree on what the system should do provide a basis for performing verification tests. trace requirements to actual classes and operations in the system. set bounds on the problem space

High-level use cases (collected to determine the complete scope of the system) Use Case – the name is usually a business or domain process (Order a product, register for courses) Actors -- external agent (person playing a role, computer system, input/output device) Type -- primary, secondary or optional Description -- a short narrative description (2 - 3 sentences)

Setting Priorities (rank order use cases) Ranking may involve a combined score including multiple factors: Impact on the architectural design Risky, time-critical, or complex functions New or risky technology Represent line-of- business processes Directly support increased revenue or decreased costs. Or ranking may simply classify use cases as high, medium, or low The most important use case is then expanded

Expanded Use Case (minimal technology references) Buy Items (essential description) Typical Course of Events:   Actor Actions: System Response: 1) This use case begins when a Customer arrives at a cashier's location with items to purchase 2) The Cashier records the identifier from each item, its description and price from the sales tag. If there is more than one of the same item, the Cashier can enter the quantity 3) Multiply the price by the quantity and add this to the ongoing sales transaction 4) When the item entry is complete, 5) Calculate the sales total 6) Cashier tells the Customer the total 7) Customer gives cash payment. 8) Cashier records the cash received amount 9) Calculate balance due the customer

Object Oriented Design (OOD) Phase Developer decides how the system will be implemented Many of the concepts become classes The design phase elaborates (adds attributes and methods) to the class model Try this technique Modify the use case to include new system features

Put new system features into the use case Buy Items (system solution) Requirements: R1, R2, R3, R4, R5, R6 Actor Actions: System Response: 1) This Use case starts when a Customer arrives at POST with items to purchase.   2) The Cashier enters UPC of each item. 3) Use UPC to determine item name, price and description. The item price is added to the sales total. If there is more than one of an item, the Cashier can enter the quantity as well or re-enter the UPC Show description and price of the current item 4) On completion of item entry, the Cashier indicates to the POST that item entry is complete. 5) Calculate and present the sales total. 6) The Cashier tells the customer the total 7) The Customer chooses payment type: 8) Log the completed sale a.       If cash, see Pay by Cash 9) Update inventory levels b.      If credit, see Pay by Credit 10) Generate a receipt c.       If check, see Pay by Check 11) The Cashier gives the receipt to the Customer 12) The Customer leaves with the items purchased.

Design a User Interface for the user

Use screen navigation diagrams when necessary

Plan the first Iteration Determine how much can be delivered within the first development cycle If necessary, create a simplified use case to fit the first time-box

Special Considerations for the first Development Cycle Try to handle the most difficult parts of the system first. If the architecture is untested, exercise the functionality of the architecture. If there is technological risk, exercise all the significant interfaces and interactions among subsystems to assure they are compatible.

Architecture – describes the structure of software systems Architecture is the set of significant decisions about the organization of a software system, the selection of the structural elements and their interfaces. Describe major subsystems External software interfaces User interface Database organization Data storage Key algorithms Concurrency Security Networking Portability Programming language Error handling

Plan Future Cycles In subsequent development cycles, add functionality to the previously delivered use case or do another use case update task assignments and milestones for each cycle: Requirements Design User documentation Test cases Technical reviews etc

First Cycle: Simplified Use Case Buy Items with cash (First Iteration) Actor Actions: System Response: 1) This Use case starts when a Customer arrives at POST with items to purchase.   2) The Cashier enters the UPC and quantity of each item. 3) The item name and description is displayed. The price is added to the sales total. 4) On completion of item entry, the Cashier indicates to the POST that item entry is complete. 5) Presents the sales total. 6) The Cashier tells the customer the sales total 7) The Customer gives a cash amount equal to or greater than the sales total 8) The Cashier enters the cash amount 9) Calculate and display change due the customer 10) Generate a receipt 11) The Cashier gives the receipt and change due to the Customer 12) The Customer leaves with the items purchased.

Make a minimum conceptual model concepts relevant to the use case being developed. A complete conceptual model would be all significant real-world concepts in the problem domain.

Find domain concepts in the use case Who are the actors and what are they trying to do? What “real world” objects are needed for each use case? How do the objects work together to complete each use case goal? Consult with domain experts Parse for noun and verb phrases Nouns become objects or attributes Verbs become operations or associations. Use a Concept Check List

Concept Check List (Craig Larman) Physical objects Specifications, designs or descriptions of things Places Transactions Transaction line items Roles Things in a container Containers of other things Catalogs Events Organizations Processes Rules and policies Records of finance, work, contracts, legal matters Financial instruments and services Manuals, books External Computer Systems or devices Abstract noun concepts

Concept Diagram of Buy Items

Decide which domain concepts become objects that implement a solution Try CRC cards to Bridge from Concepts to Classes CRC cards (Class, Responsibility, Collaboration) Original paper by Beck and Cunningham at http://c2.com/doc/oopsla89/paper.html

CRC Cards Class Name -- Domain concept or programmer created class Class Name = Sale Responsibilities: Collaborators:   store Item specs and quantity   SalesLineItem calculate a sales total  store payment amount and type   Class Name -- Domain concept or programmer created class Responsibilities -- Tasks an object can do alone because of its local knowledge Collaborators -- Tasks done by other objects because of their knowledge

Responsibility Responsibilities become class methods The method accomplishes a task by the object acting alone or with the help of others. Two Basic Responsibilities for objects Knowing object’s awareness of its own data, its links to other objects and knowledge it can derive or calculate Doing objects ability to modify itself, create and link to other objects, or delete other objects and links, command other objects to take action or control or coordinate activity in other objects

CRC Card Procedure Create cards for each relevant object in the use case -- actors initiating a message to the system -- the first object that receives the message -- every object from the domain used in the solution Walk through the handling of a system event Allocate responsibilities by deciding which class handles an event or delegates it to another object -- Put the main responsibilities of each class on the card. -- Put the collaborators of each class on the card

Role Play the Class A designer or member of a group can act the part of a "Class" when it is given control in a scenario When role playing a class, determine what can you do, how are you dependent on others

Scenarios Each use case has a successful outcome and usually one or more failure outcomes. Failures usually are: Looking for an object which does not exist (identifier not found) Creating a new object but the identifier already exists. Violation of business rules (i.e. Customer withdraws an amount that makes the balance lower than the minimum required by the bank) Use scenarios to validate the responsibilities of each object. Events leading to failure and to success

Use truth tables to check for completeness Use Case Scenarios Buy Items 1 2 3 Pre-Conditions   UPC Exists F T Customer has sufficient funds Post-Condition Actions Reject sale and provide a message X Accept transaction

Class Diagram

Interaction diagrams (sequence)

Interaction Diagrams (collaboration)

Entity-Relationship Diagrams

Free Information for UML and ER diagramming Introduction to UML Diagramming http://www.togethersoft.com/services/practical_guides/umlonlinecourse/ http://www.rational.com/media/uml/intro_rdn.pdf Introduction to ER Diagramming http://www.utexas.edu/its/windows/database/datamodeling/index.html