Introduction To Software Engineering
Introduction To Software Engineering
Software
Engineering
1
What is software?
2
What is
software?
Programs
Documentation Operating
Procedures
Software=Program+Documentation+Operating
Procedures Components of software
3
Documentation manuals are…
Formal Specification
Analysis
Context-Diagram
/Specification
Data Flow Diagrams
Flow Charts
Design
Entity-Relationship
Documentation Diagram
Manuals
Source Code Listings
Implementation Cross-Reference
Listing
Test Data
Testing Test Results
Operating
Procedures
Installation Guide
Operational
Manuals
S
y
s
t
e
m
5
Administration Guide
Software Products
6
Software products
Generic products
Stand-alone systems that are marketed and sold to any
customer who wishes to buy them.
Examples – PC software such as graphics programs,
project management tools; CAD software; software for
specific markets such as appointments systems for
dentists.
Customized products
Software that is commissioned by a specific customer to
meet their own needs.
Examples – embedded control systems, air traffic control
software, traffic monitoring systems.
7
Software Product
Software product is a product designated for
delivery to the user
Source Reports Documents
Codes
Manuals
Objects Plans
Codes Data
Test
Suites Test Prototypes
results
8
Product specification
Generic products
The specification of what the software should do
is owned by the software developer and
decisions on software change are made by the
developer.
Customized products
The specification of what the software should do
is owned by the customer for the software and
they make decisions on software changes that are
required.
9
What is software engineering?
What differences has the web made to The web has led to the availability of software services
software engineering? and the possibility of developing highly distributed
service-based systems. Web-based systems
development has led to important advances in
programming languages and software reuse.
13
Essential attributes of good software
Product characteristic Description
14
Software Application Domains
System software : A collection of programs written to
service other programs. Some system software (e.g.,
compilers, editors, and file management utilities)
Application software : Stand-alone programs that solve
a specific business need. Application software is used to
control business functions in real time (e.g., point-of-sale
transaction processing, real-time manufacturing process
control).
Web applications : These Applications called
“WebApps,” this network-centric software category spans
a wide array of applications. In their simplest form,
WebApps can be little more than a set of linked hypertext
files that present information using text and limited
graphics. 15
Software Application Domains
Engineering/scientific software : It has been characterized by
“number crunching” algorithms. Applications range from
astronomy to volcanology, from automotive stress analysis to space
shuttle orbital dynamics, and from molecular biology to automated
manufacturing.
Embedded software : It resides within a product or system and is
used to implement and control features and functions for the end
user and for the system itself. Embedded software can perform
limited and esoteric functions (e.g., key pad control for a microwave
oven) or provide significant function and control capability (e.g.,
digital functions in an automobile such as fuel control, dashboard
displays, and braking systems).
16
Software Application Domains
Batch processing systems
These are business systems that are designed to process
data in large batches. They process large numbers of
individual inputs to create corresponding outputs.
Entertainment systems
These are systems that are primarily for personal use
and which are intended to entertain the user.
Systems for modeling and simulation
These are systems that are developed by scientists and
engineers to model physical processes or situations,
which include many, separate, interacting objects.
17
Software Application Domains
Product-line software : Designed to provide a specific
capability for use by many different customers. Product-line
software can focus on a limited and esoteric marketplace (e.g.,
inventory control products) or address mass consumer
markets (e.g., word processing, spreadsheets, computer
graphics, multimedia, entertainment, database management,
and personal and business financial applications).
Artificial intelligence software : These makes use of non
numerical algorithms to solve complex problems that are not
amenable to computation or straightforward analysis.
Applications within this area include robotics, expert systems,
pattern recognition (image and voice), artificial neural
networks, theorem proving, and game playing. 18
Software engineering fundamentals
Some fundamental principles apply to all types of software
system, irrespective of the development techniques used:
Systems should be developed using a managed and
understood development process. Of course, different
processes are used for different types of software.
Dependability and performance are important for all
types of system.
Understanding and managing the software specification
and requirements (what the software should do) are
important.
Where appropriate, you should reuse software that has
already been developed rather than write new software.
19
Software
./Software does Characteristics:
not wear out.
Software doesn’t wear out because the hard drive, USB drive,
computer memory, or other “container” it’s stored in (or on)
protects it from being damaged and degrade.
./ Software is developed or engineered not manufactured
./ Reusability of components (Maintenance is without spare
parts)
./ Software is flexible (Intangible)
20
Cont…
Well-Engineered Software
Well-engineered software is one that has the following
characteristics:
It is reliable
It has good user-interface
It has acceptable performance
It is of good quality
It is cost-effective
21
Software Development Life
Cycle
Software Development Life Cycle : Suggests a systematic
sequential approach to SW development that begins at the
system level and progresses through analysis, design,
coding, testing and support
22
Software Process
A generic framework
process framework for software engineering
encompasses five activities:
Communication: Before any technical work can commence,
it is critically important to communicate and collaborate
with the customer. The intent is to understand stakeholders
objectives for the project and to gather requirements that
help define software features and functions.
Planning: Defines the software engineering work by
describing the technical tasks to be conducted, the risks that
are likely, the resources that will be required, the work
products to be produced, and a work schedule. 23
Software Process
framework
Modeling: Creation of models to help developers and
customers understand the requires and software design
Construction: This activity combines code generation and
the testing that is required to uncover errors in the code.
Deployment: The software is delivered to the customer
who evaluates the delivered product and provides
feedback based on the evaluation.
24
Software Process
models
Waterfall/Linear Sequential model
Prototype model
Evaluation model
Spiral model
25
Waterfall model
Feasibility Study
Requirement Analysis
And Specification
Design and
Specification
Coding and
Module Testing
Document Driven
Integration and
The phases don't overlap System Testing
analysis is finished
Maintenance
26
Feasibility Study
Main aim – determine whether developing the product is financially and
technically feasible
Purpose is to produce a feasibility study document that evaluates the costs
and benefits of the proposed application
Document should contain:
Definition of the problem
Formulation of different solution strategies
Alternative solutions and their expected benefits
Cost/benefit analysis performed – determine which solution is the best
Any solution – not feasible – due to high cost, resource
constraints etc
Required resources, costs, delivery dates in each proposed
alternative solutions 27
Requirement Analysis and Specification
(What to solve)
Studied by the customer and developer .
New project – much interaction is required between the
user and the developer
Functional Requirements : what the product does
Non- Functional Requirements : This may be classified
into the following categories: Reliability (availability, integrity
etc), accuracy, performance, operating constraints, human-
computer interface issues, portability issues etc
28
Design Specification (How to solve)
Description of architecture, module description
and relationships
29
Coding and Testing
Individual modules are tested before being delivered
to the customers
Alpha Testing : Carried out by the test team inside the
organization
Beta Testing : Performed by a selected group of
friendly customers
Acceptance Testing : Performed by the customer to
determine whether or not to accept the deliver of the
system
30
Maintenance
Requires much more effort than development phase
Development : Maintenance effort = 40:60 ratio
Involves performing any one/more of the following activities:
Corrective Maintenance : Correcting errors – not discovered
during the product development phase
Perfective Maintenance : Improving the implementation and
enhancing the functionalities according to customer’s
requirements
Adaptive Maintenance : Porting the SW to a new environment
31
Strength and weakness
Strength of Waterfall model
It is document driven
It is a good model to use when requirements are well understood and are quite
stable.
Late changes to requirements or design are limited
Implementing the product should be postponed until understanding the objectives
well.
Weakness of Waterfall model
The model is inflexible for change as each phase results are frozen.
This model forces the software developer to completely fulfill the scope of each
phase before moving on.
Requirements must be well-reviewed early
32
Cont…
Model is
Linear : Not possible. Need feedback
Rigid : results of each phase are frozen before proceeding to the next
phase
Monolithic : All planning is oriented to a single delivery date
36
Cont…
Requirements gathering
Quick design
Customer
Refine Requirements
suggestion Build prototype
Acceptance by user
Customer evaluation –
prototype
Implement, Test
Maintain 37
Prototype model
Actual system developed using classical waterfall model
In development effort, requirement analysis and specification
phase becomes redundant.
Prototype code – thrown away
However, experience gained - helps in developing actual
system
Prototype construction – additional cost. But, overall cost
lower than developed using Waterfall model
Experimenting with prototype - user requirements properly
defined, technical issues satisfactorily resolved
Minimizing change requests & redesign costs after the system
is delivered to customer
38
Strengths and weakness
Strengths of the Prototyping Model
There is a much lower risk of confusion in terms of
miscommunication, misunderstanding user requirements or
system features.
New or unexpected user requirements can easily be
incorporated.
Prototyping development costs are offset by avoidance of the
usual high cost of rework and repair.
The prototype can be used as a formal specification because it
is tangible and well tried.
39
Cont…
Weaknesses of the Prototyping Model
Lack of early planning may cause project management problems:
unknown schedules, budgets and deliverables.
This Model results in potentially longer development cycles.
Seeing functions in working mode early in the life cycle
stimulates users into requesting additional functions.
When to use the Prototyping Model?
When requirements are not known at the beginning of the project
When requirements are unstable and constantly changing
When users, for various reasons, do not have the capability of
expressing their requirements clearly.
When user requires proof of concept
40
Evolutionary model
Also known as successive version model
System – first broken into several modules or functional
units – incrementally developed and delivered
Developers first develop core modules – i.e., basic
requirements are addressed, but many supplementary
features remain undelivered
Initial product skeleton – refined into increasing levels of
capability by adding new functionalities in successive
versions
41
Cont…
Each version is a functioning system capable of
performing some more useful work
Core modules will be tested thoroughly
Disadvantage : difficult to subdivide the problem
Useful only for very large problems – where it is easier to
identify modules for incremental implementation
Evolves over a period of time
42
Cont…
43
Spiral model
•Focuses on identifying and eliminating high risk problems by careful
process design (Requirement analysis and Design Phases)
• Consequently, minimum and manageable risks filtered into
development phase
Development cycle is divided into 4 task areas
Requirement analysis – (identifies the objectives of the portion of the
44
Cont…
1- Requirement Analysis
4 5 2 -Risk Analysis
3 -Prototype 1
1 2
4 - Software Requirement
Analysis
9
3 5 - Risk Analysis
6 6- Prototype 2
8 7-Detailed Design
7
8-Construction
9-Testing and Evaluation
45
Cont…
Expects lot of rework in reverting to an earlier
phase and incorporating client feedback
Needs to perform risk analysis effectively
46
Selection of a Process Model
Following criteria can be considered:
Prototyping
Front heavy process
Systems with novice
Helps in requirements
Possible higher cost users
refinement
Disallows later changes
When uncertainties in
Reduces risk requirements
Lead to a better
When UI very
system
important
49
Advantages of Software Process
SW Process models have a twofold effect :
Provide guidance to software engineers on the order in
which the various technical activities should be carried
out within a project
Provide a framework for managing development and
maintenance- enable to estimate resources, define
intermediate milestones, monitor progress etc
50
Difficulties of Software Process
The software process is the way in which we produce
software.
Why is it difficult to improve software process ?
51
Software Metrics
A software metric is a measure of software characteristics
which are measurable or countable.
Software metrics are valuable for many reasons, including
measuring software performance, planning work items,
measuring productivity, and many other uses.
Software metrics can be classified into two types as follows:
1.Product Metrics
2.Process Metrics
52
Software Metrics
1. Product Metrics: These are the measures of various
characteristics of the software product. The two important
software characteristics are:
Size and complexity of software.
Quality and reliability of software.
These metrics can be computed for different stages of SDLC.
2. Process Metrics: These are the measures of various
characteristics of the software development process. For
example, the efficiency of fault detection. They are used to
measure the characteristics of methods, techniques, and tools
that are used for developing software. 53
Types of Software Metrics
Internal metrics: Internal metrics are the metrics used for
measuring properties that are viewed to be of greater importance
to a software developer. For example, Lines of Code (LOC)
measure.
External metrics: External metrics are the metrics used for
measuring properties that are viewed to be of greater importance
to the user, e.g., portability, reliability, functionality, usability,
etc.
Hybrid metrics: Hybrid metrics are the metrics that combine
product, process, and resource metrics. For example, cost per FP
where FP stands for Function Point Metric.
Project metrics: Project metrics are the metrics used by the
project manager to check the project's progress.
54
Advantages of Software Metrics
For analysis, comparison, and critical study of different
programming language concerning their characteristics.
In comparing and evaluating the capabilities and productivity
of people involved in software development.
In the preparation of software quality specifications.
In the verification of compliance of software systems
requirements and specifications.
In making inference about the effort to be put in the design
and development of the software systems.
In getting an idea about the complexity of the code.
In taking decisions regarding further division of a complex
module is to be done or not.
In guiding resource manager for their proper utilization.
In comparison and making design tradeoffs between software
development and maintenance cost and etc.
55
Disadvantages of Software Metrics
The application of software metrics is not always easy, and in
some cases, it is difficult and costly.
The verification and justification of software metrics are based
on historical/empirical data whose validity is difficult to
verify.
These are useful for managing software products but not for
evaluating the performance of the technical staff.
The definition and derivation of Software metrics are usually
based on assuming which are not standardized and may
depend upon tools available and working environment.
Most of the predictive models rely on estimates of certain
variables which are often not known precisely.
56
Object Oriented Software
Engineering
57
Outline
Introduction
The object-oriented paradigm
Object-Oriented concept and principles
Characteristics of OO Approach
Identify elements of an object model
Introduction
We live in a world of objects.
58
Introduction(Cont…)
Objects are any thing that exist in nature, in human-made, in
business, and in Products that we use.
They Can be categorized, described , organized, combined,
manipulated and created.
Consider, an example of a real world object : A is a member
(instance) of furniture , but B is a class which has many
objects.
A. chair B. furniture
59
Introduction(Cont…)
development?
Object-oriented Approach: is based on
object technology that leads to reuse, and
reuse leads to faster software development
and higher-quality programs.
60
Introduction(Cont…)
It Provides advantage at management and technical levels.
Object technologies lead to reuse. Reuse leads to:
Faster development
Higher quality programs
Easier to maintain(because its structure is inherently decoupled)
Easier to adapt
Easier to scale(Large system can be created by assembling
reusable subsystem )
61
The Object-Oriented Paradigm
For many years
OO was used to denote software development approach that
63
Object-Orientation
Object Orientation is about viewing and modeling the
world/system as a set of interacting and interrelated objects.
64
Cont…
Object -Oriented process model
65
OBJECT
What is an object?
1) any abstraction that models a single thing
2) a representation of a specific entity in the real world
3) may be tangible (physical entity) or intangible
Examples: specific citizen, agency, job, location, order, etc.
Two aspects:
• attribute/information
1) has a unique identity
2) has a description of its structure
3) has a state representing its current condition
• Behavior/method:
1) what can an object do?
2) what can be done to it?
66
Object
properties and behavior.
Properties characterize the object, describing its current state.
Behavior is the way an object acts and reacts, possibly changing its
state.
The following are some other examples of objects:
■ In a payroll program, there would be objects representing each
individual employee.
■ In a university registration program, there would be objects
representing each student, each course and each faculty member.
■ In a factory automation system, there might be objects representing
each assembly line, each robot, each item being manufactured, and each
type of product.
67
Object-Oriented Concepts
What is an object?
Consider, an example of a real world object
68
Class
What is a class?
1) any uniquely identified abstraction of a set of logically
related instances that share similar characteristics
2) a class is a software module that represents and defines
a set of similar objects, its instances.
3) a definition or template that describes how to build an
accurate representation of a specific type of objects
Examples: agency, citizen, car, etc.
69
CLASS
Class is an OO concept that describe the content and behavior of
some real world entity.
Generic attributes can be associated with every object in the
class(example: furniture).
Example:
Among the many possible attributes of
furniture are:
Cost, dimensions, weight, location, and color
Apply table, chair, sofa
Chair inherits all attributes of furniture
So, object chair can be reused the
attribute of furniture.
70
Cont…
Every objects can be manipulated in a variety of ways
Bought, sold, physically modified (saw, paint)
Operation/Service/Method: Modify one or more
attributes.
71
Cont…
The object chair encapsulates data
The attributes values that define chair
The operations (the actions that are applied to
change the attribute chair)
object encapsulates [data, operation, other objects,
constants and other related information]
Encapsulation means that all of this information
packaged under one name and can be reused as one
specification or program component.
Object-Oriented= Objects + classification+ inheritance +
communication
72
Cont…
Three characteristics of OO systems make them unique
Encapsulation
Inheritance
Polymorphism
Class encapsulate data and the operations that work on the data in a single
package.
This provides a number of important benefits:
The internal implementation details of data and
procedures are hidden from the outside
world(information hiding)
This reduces the propagation of side effects when
changes occur
73
Cont…
Data structures and the operations that
manipulate them are merged in a single named
entity- the class.
This facilitates component reuse
Interfaces among encapsulated objects are
simplified. An object that sends a message need
not be concerned with the detail of internal data
structures.
Interfacing is simplified and the system coupling
tends to be reduced.
Encapsulation separates implementation from
users/clients.
74
Cont…
Inheritance
One of the key differentiators between conventional
and OO systems.
A subclass Y inherits all of the attributes and operations
associated with its super-class, X
All data structures and algorithms originally designed
and implemented for X are immediately available for Y
No further work need be done
75
Cont…
Whenever a new class is to be created, the
software engineer has a number of options:
The class can be designed and built from
scratch inheritance is not used.
The class hierarchy can be searched to
determine if a class in the hierarchy contains
most of the required attributes and operations.
The new class inherits from the higher class
and additions may then be added, as required
76
Cont…
The class hierarchy can be restructured so that the
required attributes and operations can be inherited by
the new class
Characteristics of an existing class can be overridden
and private version of attributes or operations are
implemented for the new class.
Important to note that restructuring the hierarchy can be difficult, and for
this reason, overriding is sometimes used
Overriding occurs when attributes and operations are inherited in the
normal manner but are then modified to the specific needs of the new
class
When overriding is used “inheritance is not transitive”
77
Cont…
Multiple inheritance
Inherit some attributes and operations from one class
and others from another class.
Complicates the class hierarchy and creates potential
problems in configuration control
Sequences are more difficult to trace
Changes to the definition of a class that resides high
in the hierarchy may have an unintended impact on
classes defined lower in the architecture.
78
Cont…
Polymorphism
A characteristics that greatly reduces the effort required to
name
The choice of which one to execute depends on the
or switch statements
79
Cont…
Classes and Objects :
A class is an OO concept that encapsulates the data and procedural
abstractions required to describe the content and behaviour of
some real world entity
Data abstraction(attributes) enclosed by procedural abstraction
(operation, methods)
A class has
Generalized description
Collection of Similar objects
Super class and subclass
80
Attribute
Attributes: describe the class or object in some way
A domain is a set of specific values.
Example:
[Automobile] [Color]
Most physical objects have features such as shape,
weight, color, and type of material.
People have features including date of birth, parents, name,
And eye color.
8
2
Cont…
Message: [destination, operation, parameters]
Where
Destination defines the receiver object that is
stimulated by the message,
Operation refers to the operation that is to receive the
message, and
Parameters provides information that is required for
the operation to be successful.
8
3
Cont…
message: [D, op10, {data}]
message: (C, op08, {data})
Then C finds op08, performs it, and sends an appropriate return
value to D. Operation op10 completes and sends return value to B.
8
4
Message
An object is requested to perform one of its operations by sending
it a message telling the object what to do.
The receiver [object] responds to the message by first choosing the
operation
that implements the message name, executing this operation, and
then returning control to the caller.
Messaging ties an object-oriented system together.
Messages provide insight into the behavior of individual objects
and the OO system as a whole.
8
5
Object Models
Object models represent objects and relationships between
objects.
Each box represents :-
- A type of object and name
- Attributes, and
- Methods of the object.
An arc between two objects represents a relationship
between the objects.
Arcs may be labelled in the centre with a name of the
association.
At each end a multiplicity may be given indicating how
many different associations of the same kind are allowed.
8
6
Cont…
The three major types of relationships are
Inheritance
Aggregation, and
Association.
An inheritance relationship implies that the object at the bottom of
the arc is a special case of the object at the top of the arc.
It has an ‘‘is-a’’ relationship.
An aggregation relationship implies that the object at the bottom of
the arc is a component of the object at the top of the arc.
It has a ‘‘part-of’’ relationship.
An association relationship implies that some one of the objects is
associated with the other object.
This relationship may be two-way, or it might only be one-way.
8
7
Cont…
Identifying Classes and Objects:
Objects visible themselves in one of the ff. ways:
External entities (e.g.: other systems, devices, people)
that produce or consume information to be used by a
computer-based system.
Things (e.g., reports, displays, letters, signals) that are
part of the information domain for the problem.
Occurrences or events (e.g., a property transfer or the
completion of a series of robot movements) that occur
within the context of system operation.
8
8
Cont…
Roles (e.g., manager, engineer, salesperson) played by
people who interact with the system.
Organizational units (e.g., division, group, team) that are
relevant to an application.
Places (e.g., manufacturing floor) that establish the context
of the problem and the overall function of the system.
Structures (e.g., sensors, four-wheeled vehicles, or
computers) that define a class of objects or in the extreme,
related classes of objects.
8
9
Object Vs Class
An object is an abstraction of something of interest
to the program, normally something in the real
world such as a bank account.
A class is an abstraction of a set of objects; at the
same time it also acts as an abstract container for
the methods that operate on those objects. The
abstraction is improved if fewer methods are
public.
9
0
Basic Terms in SE
A superclass is an abstraction of a set of
subclasses: you can declare a variable to be of a
certain class, and not care that instances of its
subclasses may be put in the variable.
An interface is a similar but even better
abstraction since it has fewer details defined
(only abstract operations).
A method is a procedural abstraction that hides
its implementation: you can call the method
without having to know the implementation.
9
1
Cont…
An operation is an abstraction of a set of
methods. Better abstraction is achieved by
giving an operation fewer parameters.
❏ Attributes and associations are abstractions of
the underlying instance variables used to
implement them.
Encapsulation. A class acts as a container to
hold its features (variables and methods) and
defines an interface that allows only some of
them to be seen from outside.
9
2
Cont…
Abstraction, modularity and encapsulation each
help provide information hiding.
This arises when software developers using some
feature of a programming language or system do
not need to know all the details; they only need to
know sufficient details to use the feature.
The result is that the developers have less
confusing detail to understand and will therefore
make fewer mistakes. Hence they can work
effectively with larger systems.
9
3
End of Chapter
One
Don’t forget to start your project
9
4