Requirements Engineering Methods for Requirements Engineering Lecture-30.

Slides:



Advertisements
Similar presentations
Design by Contract.
Advertisements

Methods for Requirements Engineering
SEG3101 (Fall 2010) Structural Modeling
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
SD3049 Formal Methods Module Leader Dr Aaron Kans Module website
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
Object-Oriented Analysis and Design
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
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
Software Requirements
©Ian Sommerville 2000Software Engineering, 6/e, Chapter 91 Formal Specification l Techniques for the unambiguous specification of software.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
Overview of Software Requirements
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Methods for requirements engineering. Objectives To explain the role of methods and techniques in requirements engineering To introduce data-flow modelling.
Describing Syntax and Semantics
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
C++ fundamentals.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 10 Slide 1 Critical Systems Specification 3 Formal Specification.
The chapter will address the following questions:
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
INFO415 Approaches to System Development: Part 2
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
An Object-Oriented Approach to Programming Logic and Design
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 9 Slide 1 Formal Specification l Techniques for the unambiguous specification of software.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 6 Slide 1 Requirements Engineering Processes l Processes used to discover, analyse and.
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
CS212: Object Oriented Analysis and Design Lecture 4: Objects and Classes - I.
OHT 11.1 © Marketing Insights Limited 2004 Chapter 9 Analysis and Design EC Security.
Gregor v. Bochmann, University of Ottawa Based on Powerpoint slides by Gunter Mussbacher with material from: K.E. Wiegers, D. Leffingwell & D. Widrig,
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.
Introduction To System Analysis and Design
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
WXGE6103 Software Engineering Process and Practice Formal Specification.
Chapter 7 System models.
System models l Abstract descriptions of systems whose requirements are being analysed.
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
Software Engineering, 8th edition Chapter 8 1 Courtesy: ©Ian Somerville 2006 April 06 th, 2009 Lecture # 13 System models.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
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.
Use Case Driven Analysis Requirements Use Case Use Case Description System Sequence Diagram Chapter 5.
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Engineering and Object-Oriented Design Topics: Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles.
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
Prof. Hany H. Ammar, CSEE, WVU, and
Requirements Engineering Methods for Requirements Engineering Lecture-31.
1 SWE Introduction to Software Engineering Lecture 14 – System Modeling.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
OBJECT-ORIENTED TESTING. TESTING OOA AND OOD MODELS Analysis and design models cannot be tested in the conventional sense. However, formal technical reviews.
1 M206 Chapter 31: An Overview of Software Development 1.Defining the problem 2.Analyzing the requirement – constructing initial structural model 3.Analyzing.
1 Software Requirements Descriptions and specifications of a system.
Formal Specification.
The Movement To Objects
Object-Oriented Analysis and Design
Unified Modeling Language
(State) Model-Based Approaches II Software Specification Lecture 36
About the Presentations
Department of Computer Science Abdul Wali Khan University Mardan
Presentation transcript:

Requirements Engineering Methods for Requirements Engineering Lecture-30

Recap 2  Requirement Engineering in AMs  XP  Customer involvement  Requirement scenarios  Changes/Refactoring  Testing  Requirement methods  System models

Today’s lecture 3  Methods for requirement engineering

Class definition  An implementation of an object type  The object type Bank Customer refers to a class of bank customers  Objects that share common attributes and operations  An object is an instance of a class  For example, if “John Smith” is a bank customer, then bank customer is the class and “John Smith” is an instance of the bank customer

Operations and methods  Used to read and manipulate the data of an object  Reference only the data structures of that object type  To access the data structures of another object, objects must send messages to that object  Methods specify the way in which operations are encoded in software

Encapsulation  Packaging together of data and operations that manipulate the data  Details of how the operation is performed hidden from user  Prevents the unauthorised access of an object’s data

Inheritance  Objects at a lower level in class hierarchy inherit the operations and attributes of their parent(s)  Objects are able to incorporate data and/or operations specific to themselves  Inherits data from more than one parent is called multiple inheritance.

Illustration of object concepts

Messages  Objects communicate by sending messages  Message comprises:  Name of receiver object  Operation to be invoked  Optional set of parameters  When an object receives a message it causes an operation to be invoked  The operation performs the appropriate method

Message passing

Object modelling - Library example  A library system is intended to provide its users with the ability to automate the process of:  Acquiring library items  Cataloguing library items  Browsing library items  Loaning library items  Library items comprise published and recorded material  The system will be administered by a member of the library staff  Users must register with the system administrator before they can borrow library items

Library example (contd.)  Library users are drawn from three primary groups: Students, Members of staff and External users  All library users have as part of their registration: Name, Library number, Address, Account  In addition the following information also required for registration: Students - Degree programme and admission number. Staff - Staff number External users - Employer details

Steps in object-oriented method  Most methods based on the object-oriented model share certain common analysis steps:  Identify core objects  Construct the object structures defining the associations between object classes  Define the attributes associated with each object  Determine the relevant operations for each object  Define the messages that may be passed between objects

Object-oriented notation used

Step 1 - Initial classes identified

Step 2 - Relationships between classes  We can identify the following relationships from the partial requirements: (i) A library user borrows a library item (ii) A library item is recorded or published (iii) The system administrator registers the library user (iv) Library users are students, staff and external users (v) The system administrator catalogues the library items (vi) The library assistant issues the library items

Step 2 - Basic object model showing attributes and relationships

Step 2 - Inheritance for Library user

Step 2 - Inheritance for library item

Step 3 - Identifying the attributes  Attributes can be revealed by the analysis of the system requirements  For example, it is a requirement that all library users must be registered before they can use the library  This means that we need to keep registration data about library users  Library users may also be provided with an account to keep track of the items loaned to them  Library item has the attributes; title, description and classmark  The library user class has the attributes; name, address and library id

Step 4 - Object operations  This step is intended to describe operations to be performed on the objects  Certain operations are implicit from the object structure  These include operations for accessing and modifying the attribute values. These operations are assumed and we need not show them explicitly in the model  One way of identifying operations is by modelling the messages that may be passed between the objects

Step 4 - Messages between objects

Step 4 - Operations for library user and library staff

Step 4 - Operations for library item

Use case and event scenarios  Object operations may also be identified by modelling event scenarios for the different functions provided by the system  Events are then traced to objects that react to them  Typically scenarios model the interactions between the users and the system

Typical use-case scenario for library system

Event scenario for borrowing item

Formal methods  Requirements specification techniques can be categorised on a “formality” spectrum  Semi-formal and informal methods  Use natural language, diagrams, tables and simple notation  Include structured analysis and object-oriented analysis  Formal methods include:  Based on mathematically formal syntax and semantics  Include Z, B, VDM, LOTOS

Formal methods (contd.)  Provide a means for achieving a high degree of confidence that a system will conform to its specification  Do not absolute guarantee of correctness  Have little directly to offer to the problems of managing software projects  However, benefits can be gained from gaining a clear understanding of the task at an early stage

Components of formal specification language  Syntax that defines the specific notation with which the specification is represented  Semantics that help to define a “universe of objects” that will be used to describe the system  Relations which define the rules that indicate which objects properly satisfy the specification

Formal methods not widespread  Formal methods are not widely used amongst software developers  Factors contributing to slow acceptance of formal methods:  Difficulty in understanding the notations  Difficulty in formalising certain aspects of requirements  Payoff is not obvious.

Formal specification languages  The number of formal specification languages in use today can be broadly divided into two categories.  Model-based notations Z and Vienna Development Method (VDM)  Process algebras -based notations Communicating Sequential Processes (CSP), CCS and LOTOS

Advantages of formal methods  Removes ambiguity  Encourages greater rigor in the early stages of software engineering  Possible to verify the correctness, incompleteness and inconsistency checking of the specification

Disadvantages of formal methods  Difficult to represent behavioural aspects of problem  Some requirements can only be determined through empirical evaluation and prototyping  Do not address the problem of how the requirements are constructed  Lack of adequate tool support

Z - A model based formal method  A Z specification is presented as a collection of schemas  A Schema comprises three main parts: Name, Declarations and Predicates  Schema declarations set out the names and types of entities introduced in the schema  Schema predicate sets out the relationships between the entities in the declaration

Using Z  Variable declarations are of the form identifier:type  Predicates give properties of, and relationships between the variables  A schema may be used to describe either a state or an operation  To describe a state, the declared variables form the components of the state and the predicates give the invariant properties of the state  For an operation, the declarations consist of the initial state components, the final components, the inputs and the outputs of the operation  For an operation, the predicate part describes the relation between the inputs, outputs, and initial and final states

Z Schema

Library example  The state space of the lending library can be defined using the following schema:

Schema for borrow operation

Schema for ‘ New ’ and ‘ Return ’ operations

Key points  No ideal requirements method  System models can be considerably enriched by combining different techniques  Data-flow model is based on the notion that systems can be modelled as a set of interacting functions  The object-oriented approach is based on the notion that systems can be modelled as a set of interacting objects  Formal methods are based on mathematical principles and are intended to achieve a high degree of confidence that a system will conform to its specifications