Software Engineering Unit 2 .......... 19-July-2021
Software Engineering Unit 2 .......... 19-July-2021
What is it?
Design is what almost every engineer wants to do.
It is the place where creativity rules—where stakeholder requirements, business needs,
and technical considerations all come together in the formulation of a product or system.
Why is it important?
Design allows you to model the system or product that is to be built.
This model can be assessed for quality and improved before code is generated, tests
are conducted, and end users become involved in large numbers.
Design is the place where software quality is established.
The Design Concepts
A set of fundamental software design concepts has evolved over the history of
software engineering.
Although the degree of interest in these concepts has varied over the years,
each has stood the test of time.
Each provides the software designer with a foundation from which more
sophisticated design methods can be applied.
Abstraction Refinement
Architecture Aspects
Patterns Refactoring
Abstraction
Hide irrelevant data
A solution is stated in large terms using the language of the problem environment at
the highest level abstraction.
The lower level of abstraction provides a more detail description of the solution.
The architecture is the structure of program modules where they interact with each other in a
specialized way.
The more detailed design activities are conducted from the framework.
Architecture (Cont.)
A set of properties of Architecture
Structural Properties
“the components of a system (e.g., modules, objects, filters) and the manner in which those components
are packaged and interact with one another.
Extra-functional properties
address “how the design architecture achieves requirements for performance, capacity, reliability,
security, adaptability, and other system characteristics.
Modularity is the single attribute of a software that permits a program to be managed easily.
Monolithic software (i.e., a large program composed of a single module) cannot be easily grasped
by a software engineer.
Control paths, span of reference, number of variables,
Information Hiding
“How do I decompose a software solution to obtain the best set of modules?
The principle of information hiding suggest that modules be “characterized by design decisions
that (each) hides from all others.
Hiding implies that effective modularity can be achieved by defining a set of independent
modules that communicate with one another only that information necessary to achieve
software function.
Functional Independence
The functional independence is the concept of separation and related to the concept
of modularity, abstraction and information hiding.
The functional independence is accessed using two criteria i.e Cohesion and coupling.
It is a process of elaboration.
elaborate on the original statement, providing more and more detail as each
successive refinement (elaboration) occurs.
Why is it important?
Designing and building an elegant computer program
Designing and building computer software is challenging, creative, and just plain fun.
It solves the wrong problem serves
That’s why it’s important to understand what the customer wants before you begin to design and build
a computer-based system
What are the steps?
Inception (a task that defines the scope and nature of the problem to be solved).
Elicitation (a task that helps stakeholders define what is required)
Elaboration (where basic requirements are refined and modified).
Negotiation (what are the priorities, what is essential, when is it required?)
Specification (the problem is specified in some manner and then
Reviewed or validated (to ensure that your understanding of the problem and the stakeholders’
understanding of the problem happen together)
Management (Requirement management).
Requirements Engineering (Inception)
Inception (start)
a task that defines the scope and nature of the problem to be solved
RE asks a set of questions to establish
a basic understanding of the problem
The people who want a solution
The nature of the solution that is desired,
the effectiveness of preliminary communication and collaboration between the other stakeholders and
the software team.
Question set 1:
Theses questions focus on the customers, other stakeholders, the overall goals, and the benefits
Who is behind the request for this work?
Who will use the solution?
What will be the economic benefit of a successful solution?
Is there another source for the solution that you need?
Requirements Engineering (Inception)
Question set 2:
To gain a better understanding of the problems and allow the customer to voice his/her
perceptions about a solution
How would you characterize "good" output that would be generated by a successful solution?
What problem(s) will this solution address?
Can you show me (or describe) the business environment in which the solution will be used?
Will special performance issues or constraints affect the way the solution is approached?
Question set 3:
Effectiveness of the communication activity itself
Are you the right person to answer these questions? Are your answers "official"?
Are my questions relevant to the problem that you have?
Am I asking too many questions?
Can anyone else provide additional information?
Should I be asking you anything else?
Requirements Engineering (Inception)
Elicitation
Gathers requirements form stakeholders and establish business goals
what the objectives for the system or product are
what is to be accomplished
how the system or product fits into the needs of the business,
finally, how the system or product is to be used on a day-to-day basis.
To help overcame these problem, requirement engineers ,must approach the requirement
gathering activity in an organized manner
Requirements Engineering (Elicitation)
Process guidelines
Conduct meetings between both customers and software engineers
Rules for preparation and participation are established
Agenda is suggested
a "facilitator" (can be a customer, a developer, or an outsider) controls the meeting
a "definition mechanism" (can be work sheets, flipcharts, or wall stickers or an electronic
bulletin board, chat room or virtual forum) is used
The goal is
To identify the problem
propose elements of the solution
negotiate different approaches, and specify a preliminary set of solution requirements
Requirements Engineering (Elaboration)
Elaboration
The information obtained from the customer during inception and elicitation is expanded and
refined during elaboration.
Elaboration is driven by the creation and refinement of user scenarios that describe how the end
user (and other actors) will interact with the system
Requirements Engineering (Negotiation)
Negotiation
Agree on a deliverable system that is realistic (Reasonable) for developers and customers.
SW team & other project stakeholders negotiate the priority, availability, and cost of each
requirement
The process are
Identify the key stakeholders
These are the people who will be involved in the negotiation
Specification
Final work product produced by requirement engineer
Specification means different things to different people. It can be any one(or more)of the
following:
A written document
A set of models
A formal mathematical
A collection of user scenarios (use-cases)
A prototype
Requirements and specification both are equal
Requirement : understanding between customer and supplier
Specification – what the software must do
SRS contains : costs, delivery date, acceptance procedures, etc.
Requirements Engineering (Validation)
Validation
a review mechanism that looks for errors in content or interpretation areas where clarification
may be required.
Conflicting or unrealistic (unachievable) requirements
Consistent
Missing information
Requirements validation examines the specification to ensure that all software requirements
have been stated unambiguously; that inconsistencies, omissions, and errors have been
detected and corrected;
Validation vs verification
Requirements Engineering (Management)
Requirement Management
Requirements for computer-based systems change, and the desire to change requirements
persists throughout the life of the system.
Requirements management is a set of activities that help the project team identify, control, and
track requirements and changes to requirements at any time as the project proceeds.
Establishing the Groundwork
It’s a starting of (SR- inception) The steps required to establish the groundwork for An
understanding of software requirements.
Problem is they are located in different areas (requirement engineers or customers or end users).
It lead to
Limited time interaction
To resolve these issues groundwork has been established in the following manner:
Identifying Stakeholders
Nonfunctional Requirements
Traceability
Establishing the Groundwork
Identifying Stakeholders
Sommer ville and Sawyer [Som97] define a stakeholder as “anyone who benefits in a direct or
indirect way from the system which is being developed.”
Example:
Business operations managers and Product managers
Marketing people and Internal and external customers
End users and Consultants
Product engineers and Software engineers
Support and maintenance engineers, and others
Each stakeholder has a different view of the system, achieves different benefits, and is open to
different risks if the development effort should fail.
Establishing the Groundwork
Each of these communities will contribute information to the requirements engineering process. As information
from multiple viewpoints is collected, emerging requirements may be inconsistent or may conflict with one
another.
You should categorize all stakeholder information (including inconsistent and conflicting requirements) in a way
that will allow decision makers to choose an internally consistent set of requirements for the system.
Note: Collaboration does not necessarily mean that requirements are defined by committee.
Establishing the Groundwork
Question set 2:
To gain a better understanding of the problems and allow the customer to voice his or her
perceptions about a solution
How would you characterize "good" output that would be generated by a successful solution?
What problem(s) will this solution address?
Can you show me (or describe) the business environment in which the solution will be used?
Will special performance issues or constraints affect the way the solution is approached?
Question set 3:
Effectiveness of the communication activity itself
Are you the right person to answer these questions? Are your answers "official"?
Are my questions relevant to the problem that you have?
Am I asking too many questions?
Can anyone else provide additional information?
Should I be asking you anything else?
Establishing the Groundwork
Nonfunctional Requirements
Related to emerged properties or constraints
Emerged properties are
Reliability
Response time
Storage, etc.
Constrains are
I/O device capability
Data representation
Standards
A security attributes A general constraint, etc.
Non-functional requirements are more critical than functional requirements
If these are all not met, the system is useless
Establishing the Groundwork
Traceability
That refers to documented links between software engineering work products.
A traceability matrix allows a requirements engineer to represent the relationship between
requirements and other software engineering work products
Create traceability matrix, to create
Business Requirements.
Software Requirements Specification Document (SRS)
Project Requirement Documents (PRD)
Use Case Document.
Defect Verification Document.
User Stories
Unit II - Requirements Engineering
REQUIREMENTS ENGINEERING
19/July/2021
Requirements Engineering
Establishing the Groundwork
Eliciting Requirements 20/July/2021
Building the Requirements Model
Requirements analysis
METRICS IN THE PROCESS AND PROJECT DOMAINS 21/July/2021
Domains – Software Measurements - Metrics for Software Quality -
Software Project Estimation - Decomposition Techniques Empirical Estimation Models -
The Make/Buy Decision.
Eliciting Requirement
Eliciting Requirement
Requirements elicitation (also called requirements gathering)
Usage Scenarios
With slight differences, the variations with support of following basic guidelines
Meetings (either real or virtual) are conducted and attended by both software engineers and other stakeholders.
An agenda is suggested that is formal enough to cover all important points but informal enough to encourage the free
flow of ideas.
A “definition mechanism” (can be work sheets, flip charts, or wall stickers or an electronic bulletin board, chat room, or
virtual forum) is used.
Eliciting Requirement
Customer voice table helps to review the Quality of Product with customers and other
stakeholders
For extraction and to attempt to derive exciting requirements
variety of diagrams, matrices, and evaluation methods
Eliciting Requirement
it easy for developers to select and manage a subset of requirements to implement for the next product
increment
critics argue that a consideration of overall business goals t=and nonfunctional requirements is often
lacking
Eliciting Requirement
Service-Oriented Methods
Service-oriented development views a system as an aggregation of services
A service can be “as simple as providing a single function. e.g. request and response based
mechanism
service-oriented development focuses on the definition of services to be rendered by an
application
Example : Visit Hotel
A doorperson greets guests
A valet parks their cars
The desk clerk checks the guests in
A bellhop manages the bags.
The concierge assists guest with local arrangements
Each contact or touchpoint between a guest and a hotel employee is designed to enhance the
hotel visit and represents a service offered.
Eliciting Requirement
Scenario-based elements.
The system is described from the user’s point of view using a scenario-based approach
It is a first part of requirement model that is developed
It serves as input for the creation of other modeling elements
Building the Requirements Model
Class-based elements
Each usage scenario implies a set of objects that are manipulated as an
actor interacts with the system
These objects are categorized into classes
A collection of things that have similar attributes and common behaviors.
Attributes (e.g., name, type…)
Operations (e.g., Identify, enable…)
Also contains,
Details about Collaboration with one another
Relations and interaction between classes
Building the Requirements Model
Behavioural elements
The state diagram is one method for representing the behavior of a system by depicting its states
and the events that cause the system to change state.
A state is any observable mode of behavior
In addition,
the state diagram indicates what actions (e.g., process activation) are taken as a consequence of a
particular event.
Building the Requirements Model
REQUIREMENTS ENGINEERING
19/July/2021
Requirements Engineering
Establishing the Groundwork
Eliciting Requirements 20/July/2021
Building the Requirements Model
Requirements analysis
METRICS IN THE PROCESS AND PROJECT DOMAINS 21/July/2021
Software Measurements
Metrics for Software Quality
Software Project Estimation
Decomposition Techniques Empirical Estimation Models
The Make/Buy Decision.
Metrics in Process and Project Domain
What is it?
Software process and project metrics are quantitative measures that enable you to gain
insight into the efficacy of the software process and the projects that are conducted using
the process as a framework.
Basic quality and productivity data are collected. These data are then analyzed,
compared against past averages, and assessed to determine whether quality and
productivity improvements have occurred.
Metrics are also used to pinpoint problem areas so that remedies can be developed and
the software process can be improved.
Why do we Measure?
To Characterize
To Evaluate
To Predict
To Improve
Metrics in Process and Project Domain
Process Metrics
Process metrics are collected across all projects and over long periods of time.
Their intent is to provide a set of process indicators that lead to long-term and
Continuous basis software process improvement.
Process indicators
Enable a software engineering organization to gain insight into the efficacy of an
existing process (I.e., the paradigm, software engineering tasks, work products, and
milestones).
They enable managers and practitioners to assess what works and what doesn’t.
Metrics in Process and Project Domain
Provide regular feedback to the individuals and teams who collect measures and metrics
Work with practitioners and teams to set clear goals and metrics that will be used to achieve them
Metrics data that indicate a problem area should not be considered “negative.” These data are merely an
indicator for process improvement.
The number of errors and defects in each category is counted and ranked in descending order
Resultant data are analyzed to uncover the categories that result in the highest cost to the
organization
Plans are developed to modify the process with the intent of eliminating (or reducing the frequency
of) the class of errors and defects that is most costly
Metrics in Process and Project Domain
Project Metrics
Project metrics are used by a project manager and a software team to adapt project work flow
and technical activities.
Measurement can be used throughout a software project to assist in estimation, quality control,
productivity assessment, and project control.
Another model of project metrics suggests that every project should measure
Inputs – measures of the resources required to do the work
Outputs – measures of the deliverables or work products created during the software
engineering process
Evaluate the project team’s ability to control quality of software work products
Software Measurements
Measurements categories
Direct Measure
Direct measures of the Software Engineering Process include lines of code (LOC)
produced, execution speed, memory size, and defects reported over some set
period of time.
Easy to collect, as long as
Indirect Measure
Indirect measures of the product include functionality, quality, complexity,
efficiency, reliability, maintainability, and many other “–abilities”
Difficult to collect
Software Measurements
Size-Oriented Metrics
Function-Oriented Metrics
Reconciling LOC and FP Metrics
Object-Oriented Metrics
Use Case-Oriented Metrics
WebApp Project Metrics
Software Measurements
In addition,
Errors per person-month
KLOC per person-month
$ per page of documentation
Software Measurements
Function-Oriented Metrics
Function-oriented software metrics use a measure of the functionality delivered
by the application as a normalization value.
After calculating the function point, various other measures can be calculated as shown
below :
Productivity = FP / person-month
Quality = Number of faults / FP
Cost = $ / FP
Documentation = Pages of documentation / FP
Software Measurements
Object-Oriented Metrics
Conventional software project metrics (LOC or FP) can be used to estimate object-
oriented software projects
These metrics are not appropriate in the case of incremental software development as
they do not provide adequate details for effort and schedule estimation.
Software Measurements
Thus, for object-oriented projects, different sets of metrics have been proposed.
Number of scenario scripts
Number of key classes
Number of support classes
Average number of support classes per key class
Number of subsystems
Software Measurements
Because key classes are central to the problem domain, the number of such classes
is an indication of the amount of effort required to develop the software and also an
indication of the potential amount of reuse to be applied during system development.
Software Measurements
Examples might be user interface (UI) classes, database access and manipulation classes,
and computation classes
The number of support classes is an indication of the amount of effort required to develop
the software and also an indication of the potential amount of reuse to be applied during
system development
Software Measurements
The estimation process is simplified if the average number of support classes per key
class is already known.
Software Measurements
Number of subsystems
A collection of classes that supports a function visible to the user is known as a
subsystem
REQUIREMENTS ENGINEERING
19/July/2021
Requirements Engineering
Establishing the Groundwork
Eliciting Requirements 20/July/2021
Building the Requirements Model
Requirements analysis
METRICS IN THE PROCESS AND PROJECT DOMAINS 21/July/2021
Software Measurements
Metrics for Software Quality 22/July/2021
Software Project Estimation
Decomposition Techniques
Empirical Estimation Models
The Make/Buy Decision.
Metrics for Software Quality
Software is a complex entity. Therefore, errors are to be expected as work products are developed.
Process metrics are intended to improve the software process so that errors are uncovered in the
most effective manner
the test cases that have been created as the software is engineered.
To accomplish this real-time assessment, you apply product metrics to evaluate the quality of
software engineering work products in objective, rather than subjective ways.
Metrics for Software Quality
Project manager collecting private metrics from every individual software engineers and
combine to provide the project-level results.
Also many quality measurements are observed but the primary measurement is error
and defect.
Example
work product errors per function point
errors uncovered per review hour
Errors uncovered per testing hour
Error data can also be used to compute the defect removal efficiency (DRE)
Metrics for Software Quality
Measuring Quality
Among many measures, few measures of software quality is listed here:
Correctness :
Maintainability
Integrity
Usability
Anything else?
Code quality
Performance
Security
Reliability
Metrics for Software Quality
Defects (lack of correctness) are those problems reported by a user of the program after the
program has been released for general use.
In quality assessment purpose, defects are counted over a standard period of time, typically
one year.
To measure integrity, two additional attributes must be defined: threat and security.
Threat: is the probability (which can be estimated or derived from empirical evidence) that an
attack of a specific type will occur within a given time.
Security: is the probability (which can be estimated or derived from empirical evidence) that
the attack of a specific type will be repelled
Integrity =
Metrics for Software Quality
Where,
errors are not discovered in action
Software Project Estimation