Software Engineering Notes
Software Engineering Notes
SOFTWARE DEVELOPMENT
3.2
NB: The activities takes place sequentially but since some may need to be repeated
while others may take place simultaneously, depending on the approach to the system
building employed.
Design and Development of I.S
SYSTEMS ANALYSIS
Definition: The analysis of a problem that the organization will try to solve with an
Information System.
It consists of: -
Defining the problem
Identifying its causes.
Specifying the solution
Identifying the information requirements that must be met
by a system solution (parameters)
Important factor
Thorough understanding of existing organization and system, therefore System
Analyst identifies stakeholders (owners and users) of data in organization, also analyst
identifies hardware and software serving the organization.
Analyst therefore is able to detail problems of the existing system by: -
1. Examining documents, work papers, and procedures
2. Observing system operations
3. Interviewing stake holders
FEASIBILITY
Definition
Feasibility study is a process/ way of determining whether a solution is achievable,
given the organizations’ resources and constraints.
Three major areas of feasibility must be addressed
Technical feasibility
Determine whether the proposed solution can be implemented with the
available hardware, software, and technical resources.
Economic feasibility
Determine whether the monetary benefits of the proposed solution
outweighs the cost
Operational feasibility
Determine whether the solution is desirable within the existing managerial
and organizational framework.
System analysis process identifies several alternative solutions that can be pursued by
the organization.
Three basic solutions to a problem are: -
1. To do nothing and leave the existing situation unchanged
2. To modify/ enhance existing systems
3. To develop a new system
To select either 2nd or 3rd solutions, the analyst should produce a written systems
proposal/ report describing: -
Cost and benefits
Advantages and disadvantages of each alternative
Technical features
Organizational impacts
Definition
Systems requirement is a detailed statement of the (systems) needs that a new system
solution must satisfy, identify who needs it, where, when and how.
It defines objectives of the new/ modified system
It develops a detailed description of the functions the new system must
perform
It must consider economic, technical and time constraints
Design and Development of I.S
It must also consider goals, procedural and decision process of the origin
NB: Faulty/ poor requirements analysis is leading cause of system failure and high
system development costs.
It is difficult to attain them (requirements) if the user is unsure of what they want/
need.
SYSTEMS DESIGN
Definition
Systems Design details how a system will meet the information requirements as
determined by the systems analysis i.e. how it will fulfill the objectives
There are two types of system design – LOGICAL AND PHYSICAL DESIGN
LOGICAL DESIGN lays out the components of the system and their relationship to
each other, as they would appear to user.
Showa what the user would do not how
Describes input and outputs, processing functions
procedures and controls
PHYSICAL DESIGN is the process of translating the abstract logical model into the
specific technical design for the new system
Produces actual specifications for Hardware, Software, physical
database, input/output media, manual procedure and specific
control
End users must participate to specify requirements (that drive its system building
efforts), give the priorities, needs and biases. This increases acceptance, and reduces
unfamiliarity, power transfer and inter-group conflicts.
Design and Development of I.S
Definition
Programming is the process of translating system specifications prepared during
design stage into (program code (solution)) a full operational system.
Programming is the process of translating system specification into program
code
System development involvement is workshop that offers the required hardware and
Software tools required by the developer and should have: -
Language translators – compilers and assemblers
Module linkers and libraries
Error reporting features
Specification requirements and validation features
Documentation processing and production
Estimation, planning and process monitoring tools
Testing tools etc
TESTING
Definition
The exhaustive and thorough process that determines whether the system produces the
desired results under known conditions
50% of budget is in testing
Test date must be carefully prepared, results reviewed and corrections made in the
system
System testing
It tests the functioning of the system as a whole (integrated system) to
determine if discrete units (sub-systems) will function together as planned
Acceptance testing
Provides the final certification that the system is ready to be used in a
productive setting.
To ensure testing is clear and comprehensive a systematic test plan must be employed
NB: the development team and users prepare Test plan with details on how tests will
be carried out. It must detail: -
Expected inputs
Design and Development of I.S
Expected outputs
Expected error reactions
Expected communications
Expected termination etc
CONVERSION
Definition
The process of changing from the old system to the new system.
- Starts by checking if the system will work
under real conditions
NB: A formal conversion plan provides a schedule of all activities required to install
a new system
Conversion requires
- End user training
- Detailed documentation
PRODUCTION MAINTENANCE
Definition
Production is the stage after system installation and conversion, during which users
and specialists to determine how well it has met its original goals review the system.
It also decides whether any revisions or modifications are in order
SYSTEMS DESIGN
It involves taking scattered particulars under one idea so that every one (in the team)
understands it, also separation of the idea into parts that are related
It should be easy and straightforward to check the design consistency and translate it
for implementation
DESIGN OBJECTIVES
i. Produce information with all desired qualities i.e. accuracy, efficiency etc
ii. Develop a system that confirms with organizations policy
iii. Reduce total volume and amount of input and output to minimum practical level
iv. Design a system that must be able to handle all envisaged expansion during its
life time
v. Develop a system which will link with other systems in the organization
vi. Develop and design a realistic and cost effective system
vii. Improve information flow
Design and Development of I.S
viii. Must be understood by its operators
ix. Identify system security therefore ensure confidentiality of data, minimize risks
and accidents
PERFEC
CORRECTI Start or stop TIVE
VE MAINTE
MAINTENA NANCE
NCE
SYSTEM
ADAPTIVE RELEASE
MAINTENANCE
SYSTEM
RELEASE
PLANNING
Flow
Decision
CHAN
GE
IMPLE
MENTA
TION
IMP
AC
T
AN
CHA ALY
NGE SIS 7 6 8
REQ
UEST
5 1
4 Syste
m
3 2 Contents
devel a
- invoice
opm
program
ent
check
proc
database
ess g
Payments print
NB:
personal
each b
record
activ
calculate
ity
cost
entai
ls f
- payments
inter
actio c
Program 1.0 can call programs 2, 3, and 4, which in turn
n can call 2.1, 2.2, 3.1, 3.2 and
3.3 respectively with
the e
Date design * abstraction orga
Architectural design * modularity nizat d
Interface design *encapsulation ion
Component level design * cohesion
*compiling
There are a number of tasks carried out in an engineering organization and are
classified into their function: -
a) Production : activities that directly contribute to creating products and
services the organization sells
b) Quality management: activities necessary to ensure the quality of
products/ services maintained at this agreed level
c) Research and development: ways of creating/ improving products and
production process
d) Sales and Marketing: selling products/ services and involves activities
such as advertising, transporting, distribution etc
PEOPLE
“System are not developed by individuals but teams”.
Players in system development: -
Senior Managers: define business issues that have significant influence on the
project
Project (technical) Manager: plan, motivate,, organize and control practitioners
who do the development work
Practitioners : deliver the technical skill necessary to engineer a product
Customers : specify the requirement for the system to be engineered
End-users : interact with the released system/ product
PRODUCT
Major challenge to the system development manager is quantitative estimates and
organized plan. Production in view of scattered requirements and unavailability of
solid information and fluid (changing) requirements
Therefore examine the product and problem to be solved
PRODUCT
Generic phases that characterize system development process are; definition,
development and support. Appropriate engineering model must be employed: -
a) Linear sequential (traditional/ waterfall) model
b) Prototyping
c) RAD model
d) Spiral model
e) Incremental model
PROJECT PLANNING
Manages are responsible for
a) Writing project proposal
b) Writing project costing
c) Project planning and scheduling
d) Project monitoring and reviewing
e) Personnel selection and evaluation
f) Report writing and presentations
Project manager must anticipate problems which might arise and prepare tentative
solutions to the problem
Design and Development of I.S
- plan is used as the driver for the project
- plan (initial one) is not static but must be
modified on the project progress as mere
information becomes available
TYPES OF PLAN
a) Quality plan : describes quality procedures and standards that will be used in a
project
b) Validation plan : describes the approach, resources and schedule used for system
validation
c) Configuration management plan : describes the configuration management
procedures and structure to be used
d) Maintenance plan : predicts the maintenance requirements of the system,
maintenance cost and effort required
e) Staff development plan : describes how the skills and experience of the project
team members will be developed.
The planning process starts with an assessment of the constraints (required delivery
date, overall budget, staff available etc) affecting the project
A schedule (for the project) is drawn, analyzed and passed and subjected to later
reviews
PROJECT PLAN
Sets out: -
Resources available to the project
The work breakdown
Schedule for carrying out the work
Estimation of time and resources required to complete activities and organization then
in a coherent sequence.
Involves separating the work (project) into separate activities and judging the time
required to complete these activities, some of which are carried out in parallel
Schedules must: -
Properly co-ordinate the parallel activities properly
Avoid situation where whole project is delayed for a critical task to
be finished
Schedules must have allowances (error allowances) that can cause delays in
completion therefore flexible
They must also estimate resources needed to complete each task (human effort,
hardware, software, finance (budget) etc)
NB: key estimation is to estimate as if nothing will go wrong, then increase the
estimate to cover anticipated problems. Also add a further contingency factor to cover
the problems.
PROJECT ESTIMATION
System (software) cost and effort estimate can never be exact, too many variables,
human, technical, environmental, political can affect system cost and efforts applied
to development
a) Delay estimation until late in the project (estimates done after the project)
b) Base estimates on similar projects that have already been completed
Design and Development of I.S
c) Use relating simple decomposition technique to generate project cost and
effort estimates
d) Use one or more empirical models for system cost and effort estimation
Empirical estimation models: based an experience (historical data) and takes a form
D= f(vi)
Where d = one of a number of estimated values (e.g. effort, cost, project duration etc)
Vi = selected independent parameters (e.g. estimated *LOC or *FP)
DECOMPOSITION TECHNIQUES
Project estimate is as good as the estimate of the sizes of the work to be accomplished
Size is a quantifiable outcome of the system/ software project
Lines of Code and Function points
Design and Development of I.S
EMPIRICAL ESTIMATION MODELS
E= A+Bx (ev)c
Po99
M⁹" Kitchenham (1987)
Design and Development of I.S
b) Product based view – Quality is measured by the attributes/ ingredients in
a product
c) User based view – Quality is fitness for purpose, meeting needs as
specified
d) Value based view – the ability to provide the customer with the product/
services they want at the price they can afford.
Quality Assurance
Quality management System
- relevant procedures and standards to be
followed
- Quality Assurance assessments to be carried
out
Correctness ensures the System operates correctly and provides the value to its user
and performs the required functions therefore defects must be fixed/ corrected
Quality of design – is the characteristic the designers specify for an item/ product.
The grade of the materials, tolerance and performance specifications
Quality of conformance
The degree to which the design specification are followed during development and
construction (implementation)
Since quality should be measurable, then quality assurance need to be put in place
Design reviews
Program monitoring and reporting
Program reviews
Liaison mechanism
Quality Assurance related procedure
Test procedure
Fault reporting
Delivery mechanisms
Safety aspects
Resource usage
Correct usage of the procedures must be verified during the development phase
Testing and error correction assures system will perform as expected without deflects
or collapse and also ensures accuracy and reliability.
METRICS
Metric is a quantitative measure of the degree to which a system, component, or
process processes a given attribute. Measurement occurs as a result of the collection
of one or more data points.
Software engineers collect, measure and develop metrics so that indicators can be
obtained.
Design and Development of I.S
Indicator is a metric or combination of metrics that provide insight into the
software process, project or product itself.
Indicator provides insight that enables project managers or software engineers
to adjust the process or project to make things better.
Metrics should be collected so that process and product indicators can be ascertained,
and enable software engineers, organizations gain insight into the efficiency of an
existing process (i.e. paradigm, software engineering tasks, work products, and
milestones).
Enable software managers to asses status of an on-going project, track potential risks,
uncover problem areas before they get critical, adjust workflow or tasks and evaluate
the project teams ability to control quality of software products.
Software Measurements
Size-oriented metrics
Function oriented metrics
Extended function point metrics
Every level of software engineering has appropriate metrics that can be applied. These
includes:
Metrics for analysis which include the function based metrics
The bang metrics
Metrics for specification quality
Metrics for design model: architectural design metrics, component-level design
metrics (which tests coupling and cohesion)
Interface design metrics
The metrics for the source code
Metrics for testing
Metrics for maintenance
Software Metrics
Software metrics is any type of measurement, which relates to a software system
process or related documentation.
E.g. size measurement in lines of code
Fog index (Hunning 1962) =measure of readability of a product manual e.t.c.
Metrics fall into two classes
Control metrics
Design and Development of I.S
They provide information about process quality therefore is related to product
quality.
Predictor metrics
Measurement of a product attribute that can be used to predict an associated
product quality
E.g. Fog index predicts readability, cyclomatic complexity to predict
maintainability of software.
TESTING
Definition 2
Testing involves actual execution of program code using representative test data sets
to exercise the program and outputs are examined to detect any deviation from the
expected output
Definition 1
Testing is classified as dynamic verification and validation activities
Objectives of Testing
1. To demonstrate the operation of the software.
2. To detect errors in the software and therefore:
Obtain a level of confidence,
Produce measure of quality.
N/B 2:
The five steps of testing are based on incremental system integration i.e.
(Unit testing – module testing – sub-system testing - system testing- acceptance
testing). But object oriented development is different and levels have clear/ distinct
Operations and data forms objects –units
Object integrated forms class (equivalent to) –modules
Therefore class testing is cluster testing.
MODES OF TESTING
1. Black Box Functional Testing
This is based on specification alone, without reference to implementation details.
2. White Box Or Structural, Glass Testing
This is based on inspection of code structure (implementation details, low level
design)
Techniques
Design and Development of I.S
I. Equivalence partitioning
II. Boundary value analysis.
Equivalence partitioning
Equivalence partitioning involves breaking down the input data into sets regarded
as “equivalent”.
It relies on an assumption of “uniform behavior within ranges of input values that
are not significantly different in terms of the specification.
E.g.
-A program must handle from 1 to 10,000 records.
-If it can handle 40 records and 9,000 records chances are that it will work with
5,000 records.
-Therefore chances of detecting fault (if present) are equally good if any test case
from 1-10,000 is selected.
-Therefore if the program work for any one test case it will probably work for any
text cases in the range.
The range 1-10,000 constitutes an equivalence class i.e. A set of test cases such
that any one member of the class is as good a test case as any other.
Therefore classes:
Equivalence class 1 – less than one
Equivalence class 2 –1 to 10,000
Equivalence class 3 – more than 10,000.
Equivalence partitioning requires a test case from each class be carried out.
Statement coverage
Statement coverage involves running a series of test cases that ensure every statement
in the code is executed at least once.
E.g. Pg. 6 (Comm 64 – St. h. book)
Branch coverage
Design and Development of I.S
Requires test data that causes each branch to have a true or false outcome
E.g. Pg. 6 (IBID)
Path coverage
2.2
2.1
3.1
Inv
3.0
2.0
Path coverage
12oic
is concerned with testing all paths through a program basis path testing.
Path coverage e enables the logical complexity of a program to be measured.
It uses the measure
Pro to define a basis set of execution paths
Flow graphsgradepict logical flow through a program
m
Initialize
Else
Add 1to line
Count------
End if-------------
Design and Development of I.S
Test cases are created to guarantee that every statement is executed at least once.
Basis of test cases:
123678
1235678
1234672
1235672
TEST PLANNING
Test planning is setting out standards for the testing process rather than describing
product tests.
Test plans allow developers get an overall picture of the system tests as well as ensure
required hardware, software, resources are available to the testing team.
Components of a test plan:
Testing process
This is a description of the major phases of the testing process.
Requirement traceability
This is a plan to test all requirements individually.
Testing schedule
This includes the overall testing schedule and resource allocation.
Test recording procedures
This is the systematic recording of test results.
Hardware and software requirements.
Here you set out the software tools required and hardware utilization.
Constraints
This involves anticipation of hardships /drawbacks affecting testing e.g.
staff shortage should be anticipated here.
N/B
Test plan should be revised regularly.
TESTING STRATEGIES
This is the general approach to the testing process.
There are different strategies depending on the type of system to be tested and
development process used: -
Top-down testing
This involves testing from most abstract component downwards.
Bottom-up testing
Design and Development of I.S
This involves testing from fundamental components upwards.
Thread testing
This is testing for systems with multiple processes where the processing
of transactions threads through these processes.
Stress testing
This relies on stressing the system by going beyond the specified limits
therefore testing on how well it can cope with overload situations.
Back to back testing
It is used to test versions of a system and compare the outputs.
N/B
Large systems are usually tested using a mixture of strategies.
Top-down testing
Tests high levels of a system before testing its detailed components. The program is
represented as a single abstract component with sub-components represented by stubs.
Stubs have the same interface as the component, but limited functionality.
After top-level component (the system program) is tested. Its sub-components (sub-
systems) are implemented and tested through the same way and continues to the
bottom component (unit).
If top-down testing is used:
- Unnoticed errors maybe detected early (structured errors)
- Validation is done early in the process.
Disadvantages Of Using Top down Testing
1. It is difficult to implement because:
Stubs are required to simulate lower levels of the system. Complex components
are impractical to produce a stub that can be tested correctly.
Requires knowledge of internal pointer representation.
2. Test output is difficult to observe. Some higher levels do not generate output
therefore must be forced to do so e.g. (classes) therefore create an artificial
environment to generate test results.
N/b therefore it is not appropriat3e for object oriented systems but individual systems
may be tested.
Bottom-up testing
This is the opposite of top-down testing. This is testing modules at lower levels in the
heirarchy, then working up to the final level.
Advantages of bottom up are the disadvantages of top-down. +
1. Architectural faults are unlikely to be discovered till much of the system has been
tested.
2. It is appropriate for object oriented systems because individual objects can be
tested using their own test drivers, then integrated and collectively tested.
SOFTWARE MAINTENACE
Information is fed back to all previous development phases and errors and omissions
in original software requirements are discovered, program and design errors found
and need for new software functionality identified.
Definition 1
Maintenance is the process of changing a system after it has been delivered and is in
use.
Simple - correcting coding errors
Extensive - correcting design errors.
Enhancement- correcting specification errors or accommodate new requirements.
Definition 2
Maintenance is the evolution i.e. process of changing a system to maintain its ability
to survive.
Design and Development of I.S
Types of maintenance
There are three different types of maintenance:
a) Corrective maintenance:
This involves fixing discovered errors in software.
(Coding errors, design errors, requirement errors.)
b) Adaptive maintenance:
This is changing the software to operate in a different environment (operating
system, hardware) this doesn’t radically change the software functionality.
c) Perfective maintenance:
Implementing new functional or non-functional system requirements, generated
by software customers as their organization or business changes.
d) Preventive maintenance:
Making changes on software to prevent possible problems or difficulties (collapse,
slow down, stalling, self-destructive e.g. Y2K).
Maintenance cost (fixing bugs) is usually higher than what software is original
due to: -
I. Program’s being maintained may be old, and not consistent to modern software
engineering techniques.
They may be unstructured and optimized for efficiency rather than
understandability.
II. Changes made may introduce new faults, which trigger further change
requests. This is mainly since complexity of the system may make it difficult to
assess the effects of a change.
III. Changes made tend to degrade system structure, making it harder to understand
and make further changes (program becomes less cohesive.)
IV. Loss of program links to its associated documentation therefore its
documentation is unreliable therefore need for a new one.
MAINTENANCE PROCESS
Maintenance process is triggered by
(a) A set of change requests from users, management or customers.
(b) Cost and impact of the changes are assumed, If acceptable, new release is planned
(involving elements of adaptive, corrective and perfective maintenance).
(c) Changes are implemented and validated and new versions of system released.
4.0
1.0
Pr
St
It
St
Pr
St
oc
ar
er
op
oc
ar
es
tt
ati
es
ss
on
L
oo
ps
SYSTEM DOCUMENTATION
It is a very important aid to maintenance engineers.
Definition.
It includes all documents describing implementation of the system from requirements
specification to final test plan.
The documents include:
Requirement documents and an associated rationale
System architecture documents
Design and Development of I.S
Design description
Program source code
Validation documents on how validation is done
Maintenance guide for possible /known problems.
Documentation should be
Clear and non-ambiguous
Structured and directive
Readable and presentable
Tool-assisted (case tools) in production (automation).
PROGRAM EVALUATION DYNAMICS
Program evolution is the study of system change Lehman’s Laws (by Lehman
Beladay 1985) about system change.
The Laws are:
a) Law of Continuing change
Program used in real world environment must change or become progressively less
useful in the environment.
b) Law of Increasing complexity
Program changes make its structure more complex therefore extra resources must be
devoted to preserving and simplifying the structure.
c) Law of Large program evolution
Program evaluation in self-regulating process.
d) Law of Organization stability
In a program lifetime its rate of development is approximately constant and
independent of resources devoted to system development.
e) Law of Conservation familiarity
Over the system lifetime the incremental change in each release is approximately
constant.
1. CONFIGURATION MANAGEMENT
Software configuration
A collection of the items that comprise all information produced as part of the
software process.
The output of software process in information and include PC programs,
documentation and the data (in its program and external to it).
Definition 2
Design and Development of I.S
The process, which controls the changes, made to a system and managers the different
versions of the evolving software product.
Involves development and application of procedures and standards for managing an
evolving system product. Procedures should be developed for building system
releasing them to customers
Standards should be developed for recording for recording and processing proposed
system changes and identifying and storing different versions of the system.
Configuration managers (team) are responsible for controlling software changes.
Controlled systems are called baselines. They are the starting point for controlled
evolution.
2. CHANGE MANAGEMENT.
Change management process involves technical change analysis, cost-benefit analysis
and change tracking