Requirements Analysis 2 What objects collaborate to achieve the goal of a use case?

Slides:



Advertisements
Similar presentations
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Advertisements

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 2.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Introduction To System Analysis and Design
Summary Class responsibility cards can be used to help allocate responsibilities between different classes. The use of stereotype classes, such as entity,
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
Refining the Structure of the Requirements Model Aim: To create the conditions for software re-use. Bennett, McRobb and Farmer ch 8.
Requirements Analysis 1 Use Cases -> Class Diagrams Moving from the user towards the system.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
From Class Diagrams to Databases. So far we have considered “objects” Objects have attributes Objects have operations Attributes are the things you record.
Slide 1 Chapter 7 Structural Modeling. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Revision Session 3 Adding the detail and design for re-use.
7M701 1 Software Engineering Systems Models Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 7 (some items)
Documenting Requirements using Use Case Diagrams
Lecturer: Dr. AJ Bieszczad Chapter 66-1 Object-Oriented analysis and design Special nature of OO development Use cases Design with UML OO system design.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Requirements Analysis
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Use Case Analysis – continued
Representing Systems Sixth Meeting. Modeling Systems Models block-diagram Used throughout engineering Represents behavior and structure of systems. Only.
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
The chapter will address the following questions:
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Objectives Design Class Diagrams Issues in system design Generalization Review UML papers.
CPT 140 Programming Constructs1 OBJECT ORIENTED TECHNOLOGY Terminology and Basic Concepts.
Introduction To System Analysis and design
OO Analysis and Design CMPS OOA/OOD Cursory explanation of OOP emphasizes ▫ Syntax  classes, inheritance, message passing, virtual, static Most.
Requirements Elicitation. Requirement: a feature or constraint that the system must satisfy Requirements Elicitation: specification of the system that.
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
OBJECT AND CLASES: THE BASIC CONCEPTS Pertemuan 8 Matakuliah: Konsep object-oriented Tahun: 2009.
Chapter 5 Analysis Model. Analysis model (AM) The first step in describing how the system will implement the requirements specification The first step.
ANALYSIS REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Introduction to Sequence Diagrams
1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis Activity (Identifying Objects, Scenarios) Janice Regan,
1 Object orientation. 2 What benefits does OO give? Primarily –Encapsulation (Associates data & operations) –Types & specialisation –Software re-use.
Introduction To System Analysis and Design
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Systems Analysis and Design in a Changing World, 3rd Edition
NI ©UNITEN 2000/01 1 Faculty of Applied Engineering and Urban Planning Software Engineering Department Class Diagram Faculty of Information system Technology.
© Bennett, McRobb and Farmer Requirements Analysis Based on Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design.
CSC480 Software Engineering Lecture 11 September 30, 2002.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling.
UML-1 4. Architecture. UML-2 Artifact: Analysis Class Abstraction of one or several classes or subsystems –Focuses on handling functional requirements.
What is a Structural Model?
Structural Modeling Chapter 7. Key Ideas A structural or conceptual model describes the structure of the data that supports the business processes in.
1 Structural Modeling Chapter 7. 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business processes.
© 2010 Bennett, McRobb and Farmer1 Requirements Analysis 2: Realizing Use Cases Based on Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems.
1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.
Design Model Lecture p6 T120B pavasario sem.
 Week08.  Review Schedule Weeks 8-14  This week o Review last class o Introduce Class Diagrams o ICE-03 Sheridan SYST Engineering Quality Systems.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling.
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
Analysis Yaodong Bi. Introduction to Analysis Purposes of Analysis – Resolve issues related to interference, concurrency, and conflicts among use cases.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling.
High Level Design Use Case Textual Analysis SE-2030 Dr. Mark L. Hornick 1.
Basic Characteristics of Object-Oriented Systems
UML Diagrams: Class Diagrams The Static Analysis Model
The Movement To Objects
The Object Oriented Approach to Design
Analysis models and design models
Software Analysis.
Use Case Analysis – continued
Presentation transcript:

Requirements Analysis 2 What objects collaborate to achieve the goal of a use case?

Class Collaboration What classes do we need to realise a use case? What entity classes are involved? We will also need –a boundary class for the interface –a control class for the use case These are called : Analysis Class Stereotypes

What classes do we need to model a use case? Source:

How would you relate these elements?

Classes and responsibilities What is the role of each object in realising the use case? Class Responsibility Cards – who does what?

1. Entity Classes -used to model data and behaviour of some real life system concept or entity e.g. member, bank account, order, employee. These will sometimes require more persistent storage of information e.g. a student’s details are ultimately stored as a student record. Represent the more permanent aspects of an application so class descriptions are less likely to change e.g. members will always be added, updated and removed from a membership system.

2. Boundary (interface) Classes - model the interaction and manage communication between the computer system and its users. but don’t directly represent the specific interface object used to identify the main logical interfaces with users and other systems (including e.g. other software packages, printers). main task is to translate information across system boundaries partition the system so that interface is kept separate from business logic These will end up as describing screens, reports, HTML pages, or other system interfaces that actors interact with.

3.Control Class – approx 1 per use case glue between boundary elements and entity elements, describing the logic required to manage the various elements and their interactions Represent coordination, sequencing, transactions and control of other objects Represents the calculation and scheduling aspects if the logic of the use case i.e those bits of functionality that are not specific to the entity class but are specific to the use case.

What control classes do we need? Roughly one per use case. BUT Many controllers can be simple enough to be implemented as a method of an entity or boundary class.

Why do we do this? Stereotyping boundary classes means that the system is partitioned so that any changes to the interface or communication part are localised there. Stereotyping entity classes provide a model of the more permanent aspects of the application domain The control classes represent the calculation and scheduling aspects of the logic of the use case. If the functionality required changes, then the change can be localised.

Why do we use this model? Seperating the interface and control elements make it easier to change the software as change is localised. E.g. A new interface Minor changes in functionality

Example Agate (p246) Packages mark out related but distinct application areas: advert preparation, staff management, campaign management. campaign management Control staff management advert preparation User Interface

Drawing a Class Diagram 1.Think about the things and concepts in the application domain which are important to the goals of the system being developed, 2.Identify entities and relationships. 3.Look at the use cases and identify sets of classes that can interact to realise each use case. 4.Draw a robustness diagram to show this 5.Add detail – draw a communication diagram, use CRC cards

Example: Issue dvd Identify relevant entities :loan :dvd :customer attendant Which entities are involved in issuing a dvd? – check the use case template

Add boundary and control objects Issue dvd Issue dvd use case Issue dvd user interface Entities dvd Loan Customer Issue dvd :loan :issuedvd :issuedvdUI :dvd:customer

Collaboration Diagrams A collaboration can realise a specific use case. It identifies participating objects and the links between them Issue dvd :loan :issuedvd :issuedvdUI :member

Example : Make appointment 1. Entity Classes Doctor Appointment Patient 2. Interface class: Make_appointment_UI 3. Control class: Make_appointment

Robustness/Communication Diagram A collaboration can realise a use case. It identifies participating objects and the links between them Make Appointment (use case) :makeapt :makeaptUI :patient :appointment:doctor

Communication Diagrams A communication diagram shows: the internal details of the collaboration The details of interaction between objects in the form of messages passes between them e.g. the issue dvd object sends the UI object a message to start the interface. :issuedvd:issuedvdUI Start interface

Communication Diagram – show objects and message passing :loan :issuedvd :dvd 1.Request DVD customer ID 2. Get customer details 4. Get dvd details 5. Add loan details 3. Check overdue dvds :customer attendant :issuedvd_UI

Finding operations Nouns and action verbs in the use case template Locate the operation in the same class as the data it needs to update Imagine objects as independent actors (e.g. Bank account) Use e.g. class responsibility cards and act out use case.

Creating the Conditions for ReUse Using abstraction/generalisation/ (inheritance in c#) Through the encapsulation of composite structures/ components (polymorphism in c#) Focus on external behaviour, ignoring internal detail of how that behaviour is produced Composition involves encapsulating a group of classes that have the capacity ti be a reusable subassembly

Inheritance Hierarchies IS-A, IS-A-Kind-of relationship Abstract and concrete classes The generality of a superclass lets it be used by other systems Use common sense when identifying superclasses.

Multiple Inheritance Class inherits features from more than one class.

Working with your list of classes Is it beyond the scope of the system? Does it refer to the system as a whole? Does it duplicate another class? Is it too vague? Is it too specific? Is it too tied up with physical inputs and outputs? Is it really an attribute (e.g. name) ? Is it really an operation (e.g. sale or stockitem.sell)