Unit 3 Software Engineering Concepts and Standards: Structure Nos
Unit 3 Software Engineering Concepts and Standards: Structure Nos
Unit 3 Software Engineering Concepts and Standards: Structure Nos
3.0 Introduction 29
3.1 Objectives 30
3.2 Software Development Approaches 30
3.2.1 Waterfall Model
3.2.2 Spiral Model
3.2.3 Selection of Approach
3.3 Analysis 33
3.4 Design 42
3.5 Sample Design Document 48
3.6 Coding 50
3.7 Testing 51
3.8 Test Design Document 53
3.9 Summary 55
3.10 Further Readings 55
3.0 INTRODUCTION
29
Elements of Project
Development
3.1 OBJECTIVES
After going through this unit, you should be able to:
5 learn about the various phases of software development life cycle;
6 understand software development models;
7 understand the importance and concept of documentation;
8 learn about various documents and process of documentation;
9 understand application of various standards of documentation processes;
10 differentiate between various documentation processes;
11 understand the relation between documentation and quality of software, and
12 understand the good practices for documentation process.
13 Analysis
14 Design
15 Coding
16 Testing.
As you have already learnt about different software development models (in the
course MCS-034), in details, here, briefly, we provide the description of linear and
spiral approach to software development which will be useful to you in your
Mini- project. The following are some of the models adopted to develop software:
It is the simplest, oldest and most widely used process model. In this model, each
phase of the life cycle is completed before the start of a new phase. It is actually the
first engineering approach of software development. Figure 1 depicts the Water Fall
Model.
Requirements Analysis
30
Design
Software Engineering
Concepts and Standards
A slight modification of the waterfall model is a model with feedback. Once software
is developed and is operational, then the feedback to various phases may be provided.
Risk Analysis: The risks are identified to the extent possible. They are analysed and
necessary steps are taken.
Development: Based on the risks that are identified, an SDLC model is selected and
followed.
Planning: At this point, the work done till this time is reviewed. Based on the
review, a decision regarding whether to go through the loop of spiral again or not will
be decided. If there is need to do so, then planning is done accordingly.
In the spiral model, these phases are followed iteratively. Figure 2 depicts the
Boehm’s Spiral Model (IEEE, 1988).
31
Elements of Project
Development
The inner cycles of the spiral model represent early phases of requirements analysis
and after prototyping of software, the requirements are refined.
In the spiral model, after each phase a review is performed regarding all products
developed upto that point and plans are devised for the next cycle. This model is a
realistic approach to the development of large scale software. It suggests a
systematic approach according to classical life cycle, but incorporates it into iterative
framework. It gives a direct consideration to technical risks. Thus, for high risk
projects, this model is very useful. The risk analysis and validation steps eliminate
errors in early phases of development.
Each development process is viable and useful, but each one works better in some
situations than it does in others.
3.3 ANALYSIS
Analysis describes the “What” of a system. The objectives that are to be achieved in
Software process development, are the requirements. In the requirements analysis
32
Software Engineering
Concepts and Standards
phase, the requirements are properly defined and noted down. The output of this
phase is SRS (Software Requirements Specification) document written in the natural
language. According to IEEE, requirements analysis may be defined as (1) the
process of studying user’s needs to arrive at a definition of system hardware and
software requirements (2) the process of studying and refining system hardware or
software requirements.
The main activities in the analysis phase are cost estimation, project planning and
scheduling, feasibility report preparation, and the development of SRS (software
requirement specifications) document of the project.
Feasibility Report
You may include the following contents in the feasibility report given in the Table
shown below:
Cost Estimation
Cost estimates are made to discover the cost to the developer, the cost of producing a
software system. It is an important activity in the real time project management,
however, this course may not require you to calculate cost estimation but it is
important for you to understand different methods of cost estimation for future use.
There are different cost estimation methods available like LOC, COCOMO, Putnams,
Statistical method and functional point methods, you can refer your MCS-034 course
material for further details.
Scheduling Techniques
The following are the various types of scheduling techniques in software engineering:
Work Breakdown Structure: The project is scheduled in various phases following a
bottom-up or top-down approach. A tree-like structure is followed without any loops.
At each phase or step, milestone and deliverables are mentioned with respect to
requirements. The work breakdown structure shows the overall breakup flow of the
project and does not indicate any parallel flow. Figure 3 depicts an example of a
work breakdown structure.
33
Elements of Project
Development
Software Project
i a1
ii a2
Milestone
i b1 Figure 3: An
ii b2 example WBS
Milestone
The project is
i c1
split into
Milestone requirement and
i d1 analysis, design,
ii d2 coding, testing
Milestone and
maintenance phase. Further, requirement and analysis is divided into R1,R2, ..
Rn; design is divided into D1,D2..Dn; coding is divided into C1,C2..Cn; testing is
divided into T1,T2.. Tn; and maintenance is divided into M1, M2.. Mn. If the project
is complex, then further sub-division is done. Upon the completion of each stage,
integration is done.
Flow Graph: Various modules are represented as nodes with edges connecting
nodes. Dependency between nodes is shown by flow of data between nodes. Nodes
indicate milestones and deliverables with the corresponding module implemented.
Cycles are not allowed in the graph. Start and end nodes indicate the source and
terminating nodes of the flow. Figure 4 depicts a flow graph.
M2
Start M1
M4 End
M3
M1 is the starting module and the data flows to M2 and M3. The combined data from
M2 and M3 flow to M4 and finally the project terminates. In certain projects, time
schedule is also associated with each module. The arrows indicate the flow of
information between modules.
Gantt Chart or Time Line Charts: A Gantt chart can be developed for the entire
project or a separate chart can be developed for each function. A tabular form is
maintained where rows indicate the tasks with milestones and columns indicate
duration (weeks/months) . The horizontal bars that spans across columns indicate
duration of the task. Figure 5 depicts a Gantt Chart. The circles indicate the
milestones.
34
Software Engineering
Concepts and Standards
Program Evaluation Review Technique (PERT): Mainly used for high-risk projects
with various estimation parameters. For each module in a project, duration is
estimated as follows:
Figure 5: Gantt chart
2) Time taken to complete a project or module with minimum time (all resources
available), tmin.
An average of tnormal, tmin, tmax and thistory is taken depending upon the project.
Sometimes, various weights are added as 4*tnormal, 5*tmin, 0.9*tmax and 2*thistory
to estimate the time for a project or module. The Project manager fixes the
parameters.
The software project management tools support project planning and scheduling.
Some of the sample information that you can produce using these tools are:
• read the structured data available in the Excel files and store it in a Database
system,
• validate data of the database on the basis of predefined business rules,
• prepare reports on data that is found to be in error during validation, and
• prepare MIS reports from the validated data.
Delivery Deadlines
PROJECT PLAN
1. OBJECTIVES
• The proposed system should be able to read the data from Excel files and store
validated data in the Database.
• ……………………………………….
The products that will be delivered (You need not include all for an actual system):
35
Elements of Project
Development
Clint Workstations
A robust Database Management Server
Any other third party software.
The activities in the system, after including the provisions for security, are:
4. RESOURCE REQUIREMENT
The Hardware, Software, and Tools are required for the three different environments,
viz., Development environment, Quality Control environment, Deployment
environment. These resources may be documented accordingly.
5. SCHEDULING
GANTT Chart
A very elementary Gantt or Timeline Chart for the development plan is given below.
The plan explains the tasks versus the time they will take to complete.
PERT Chart
A suitable PERT Chart for the development plan can be given here.
36
Software Engineering
Concepts and Standards
6. BUDGETARY ESTIMATES
The whole budgetary estimates may be divided into resource procurement and
software development costs. The software development efforts and cost may be
estimated with the help of COCOMO or any other model used by the organisation.
TABLE OF CONTENTS
Introduction
• Purpose
• Scope
• Definition
• Product and its function
• Benefits and Goals
• Overview.
Overall Description
• Product Description
• Product Functioning
• Functions of Project
• Users of Project
• Assumptions made.
Specific Requirements
• Interface Requirements
• User Requirements
• Hardware Requirements
• Software Requirements
• Logical Database Requirements.
Basic Processing Actions of the System
Appendices
• Input/Output Formats
• Instruction for Security
• Results of Fact Finding
• Data Model
• Functional Model
• Process Specification.
37
Elements of Project
Development
Purpose
SRS contains details of the proposed software system, sufficient enough for the
designers to design the system. Thus, SRS is a means of communicating the findings
of the analysis stage to the design stage. The SRS includes:
5 Interface,
6 Logical Database,
7 Hardware, and
8 Performance and other constraints.
It also contains the assumptions made by the analyst and any systemic dependency.
Scope
The scope of SRS contains all the areas related to the project. The scope of SRS
includes:
• Proposed software description,
• Users of the proposed software,
• Functional requirements of the software,
• Assumptions and dependencies in the system, and
• Constraints.
Definition
.……………………..
Product Functioning
• The Raw data from the Clients is put into the database.
…………………………………………………..
• User Verification
The User is asked to enter the Username and Password. The system checks the
validity of Username and Password, otherwise the User is asked to do so again. A
maximum of three valid attempts are given to the user.
• Upload Raw Data
……………………….
• Validate Data
……………………….
• Put the Validated Data
38
Software Engineering
Concepts and Standards
……………………….
• Generating Reports
…………………………..
Users of the Product
………………………
Assumptions
……………………
SPECIFIC REQUIREMENTS
Interface Requirements
The Interface requirements include:
User Requirements
After a careful study of the requirements of the Client, analysts have come up with a
set of requirements.
…………………………………..
• Development environment,
• Quality Control environment, and
• Production environment.
The hardware requirements for all the platforms may be indicated here.
APPENDICES
APPENDIX A
39
Elements of Project
Development
Rounded Square box is used for system display
Login Screen
The following screen that inputs the Username and Password from the User for
authentication of the User to the system is:
Login Id
Password
Close Login
APPENDIX B
DATA MODEL
Classes involved in the Project
• Clients
• Excel Data Files
• Reports
40
Software Engineering
Concepts and Standards
phone number
fax
email
Excel data Files excel file number
client number
Reports report number
report name
client number
APPENDIX E
FUNCTIONAL MODEL
One sample DFD at level 1 contains the following processes:
• Verification of username and Password
• Data Migration,
• Validation of Migrated data, and
• Generating Reports.
You can make various levels of DFDs
Reports
Validation
Reports
Process Specification
Let us give one sample process verification.
Processing
The Client enters the Username and Password and clicks the Login button.
The system connects with the DBMS and verifies them in the related database. If
both are valid: allow user to enter the system with the allowed access rights for that
user. Otherwise prompt wrong Username-Password message and take the user to the
screen where s/he can re-enter the Username-Password.
Interface Description
41
Elements of Project
Development
The interface contains the text boxes where the user can enter Username and
Password. It also contains a Login button for login and a Close button on closing the
application.
Internal Data Structure
The process uses the encrypted username and password table that also contains
information on access permission.
3.4 DESIGN
Software design is all about developing the blue print for designing workable
software. The goal of a software designer is to develop models that can be translated
into software. Unlike design in civil and mechanical engineering, software design is a
new and evolving discipline contrary to classical building design etc. In early days,
software development mostly concentrated on writing codes. Software design is
central to the software engineering process. Various design models are developed
during the design phase. The design models are further refined to develop detailed
design models, which are closely related to the program.
Software Design Process
Software design is the process of applying various software engineering techniques
for developing models in order to define a software system, which provides sufficient
details for the actual realisation of the software. The goal of software design is to
translate user requirements into an implementable program.
Software design is the only way through which we can translate user requirements to
workable software. In contrary to designing, a building software design is not a fully
developed and mature process. Nevertheless the techniques available provides us
with tools for a systematic approach to the design of software. Figure 6 depicts the
process of software design.
Information
model Data design
User Functional
Requirements model System design Code
Procedural design
Requirements
During the process of software design, the information model is translated in to data
design. Functional model and behavioural model are translated to architectural
design, which defines major component of the software. Keeping in view the
importance of design, it should be given due weightage before rushing to the coding
of software.
Software design forms the foundation for implementation of a software system and
helps in the maintenance of software in the future too. Software quality and software
design process are highly interrelated. Quality is built into the software during the
design phase.
High level design gives a holistic view of the software to be built, whereas low level
refinements of the design are very closely related to the final source code. A good
design can make the work of programmer easy and hardly allows the programmer to
forget required details. Sufficient time should be devoted to the design process to
ensure good quality software.
42
Software Engineering
Concepts and Standards
9 The design should follow a hierarchical organisation,
10 Design should be modular or logically partitioned into modules, which are
relatively independent and perform independent task,
The system design specification is developed in a two stage process. In the first step,
design specification generally describes the overall architecture of the system at a
higher level. The second step provides the technical details of low-level design,
which will guide the implementer. It describes exactly what the software must
perform to meet the requirements of the system.
Various tools are used to describe the higher level and lower level aspects of system
design. The following are some of the tools that can be used in the System Design
Specification to describe various aspects of the design.
Data Dictionary
Definition of all the data and control elements used in the software product or
sub-system. Complete definition of each data item and its synonyms are
included in the data dictionary. A data dictionary may consist of description
of data elements and definitions of tables.
Table Definitions
43
Elements of Project
Development
• Key order for all the tables, possible keys including primary key and foreign key.
E-R Model: Entity-relationship model is database analysis and design tool. It lists
real-life application entities and defines the relationship between real life entities that
are to be mapped to the database. E-R model forms the basis for database design.
Security Model: The database security model associates users, groups of users or
applications with database access rights.
Trade-off Matrix
A matrix that is used to describe decision criteria and relative importance of each
decision criterion. This allows comparison of each alternative in a quantifiable term.
Decision Table
A decision table shows the way the system handles input conditions and subsequent
actions on the event. A decision table is composed of rows and columns, separated
into four separate quadrants.
Timing Diagram
Describes the timing relationships among various functions and behaviours of each
component. They are used to explore the behaviours of one or more objects
throughout a given period of time. This diagram is specifically useful to describe
logic circuits.
Log out
Figure 7: A state machine diagram
Message 1 ( ) Message 2 ( )
44
Software Engineering
Concepts and Standards
Start
Input
Processing
Output
End
Object
Inheritance Diagram
Account Client
It is a design diagram work product that primarily documents the inheritance
relationships between classes and interfaces in object-oriented modeling. The
standard notation consists of one box for each class. The boxes are arranged in a
hierarchical tree according to their inheritance characteristics. Each class box
includes the class name, its attributes, and its operations. Figure 10 shows a
typical inheritance diagram.
45
Elements of Project
Development
Aggregation Diagram
The E-R model cannot express relationships among relationships. An
aggregation diagram shows relationships among objects. When a class is
formed as a collection of other classes, it is called an aggregation relationship
between these classes. Each module will be represented by its name. The
relationship will be indicated by a directed line from container to container.
The directed line is labelled with the cardinality of the relationship. It
describes “has a” relationship. Figure 11 shows an aggregation between two
classes (circle has a shape).
Circle Shape
Structure Chart
A structure chart is a tree of sub-routines in a program (Refer to Figure 12).
It indicates the interconnections between the sub-routines. The sub-routines
should be labelled with the same name used in the pseudo code.
System
Pseudocode
Pseudocode is a kind of structured English for describing algorithms in an
S/Beasily readable and modular
account form. It allows
Current Account the designer to focus on theIndividual
Corporate logic
of the algorithm without being distracted by details of language syntax in
which the code is going to be written. The pseudocode needs to be complete.
It describes the entire logic of the algorithm so that implementation becomes
a routine mechanical task of translating line by line into the source code of
the target language. Thus, it must include flow of control.
This helps in describing how the system will solve the given problem.
“Pseudocode” does not refer to a precise form of expression. It refers to the
simple use of Standard English. Pseudocode must use a restricted subset of
English in such a way that it resembles a good high level programming
language. Figure 13 shows an example of pseudo code.
4. Appendices.
Architecture Design
Give the architecture of the system based on the analysis and flow models.
DATA DESIGN
Refine the E-R diagram if needed and make one table for each entry and data store
and table for all M.M relationships.
47
Elements of Project
Development
client_no Primary Key
client_number Not Null
client_addr Not Null
…….
INTERFACE DESIGN
Follow the basis rules for the interface design. These can be classified into three main
types:
The system has to use proper external data. The system makes a connection with the
DBMS to do so. The rules that have to be followed while interfacing with the
external data are:
• It is always better to encrypt the data and then store it in the database.
PROCEDURAL DESIGN
48
Software Engineering
Concepts and Standards
If the Username and Password is correct then give permission with allowed access
rights.
Else, access is denied and the enter Username and Password screen is shown again.
This cycle may be repeated for a maximum of three times.
Flow Chart
START
Enter username
and Password
Verify from
database
Maximum 3 chances
Is Correct?
Print bad Username and
Password
STOP
Interface Design
Login Screen
49
Elements of Project
Development
Security is the integral part of any system. You can use encryption and authentication
or any other security mechanism as the need may be.
3.6 CODING
The input to the coding phase is the SDD document. In this phase, the design
document is coded according to the module specification. This phase transforms the
SDD document into a high-level language code. Currently, major software companies
adhere to some well-specified and standard style of coding called coding standards.
Good coding standards improve the understanding of the code. Once a module is
developed, a check is carried out to ensure that coding standards are followed.
Coding standards generally give guidelines on the following:
i) Name of the module
ii) Internal and External documentation of source code
iii) Modification history
iv) Uniform appearance of codes.
It must contain proper comments. The coding should be structured as per software
architecture.
VALIDATION CHECKS
COMMENTS
Comments are an integral part of any system. Like any properly developed and
maintained system with high quality, this system too has sufficient comments and
description of the processes, functions, classes, and data structures.
CODING STANDARDS
3.7 TESTING
Testing
Testing is the process of running the software on manually created inputs with the
intention to detect errors. In the process of testing, an attempt is made to detect errors,
to correct the errors in order to develop error free software. Testing is performed
keeping the user’s requirements in mind and before the software is actually launched
on a real system, it is tested.
Normally, while developing the code, a software developer also carries out some
testing. This is known as debugging. This unearths the defects that must be removed
from the program. Testing and debugging are different processes. Testing is meant
for finding the existence of defects while debugging stands for locating the place of
50
Software Engineering
Concepts and Standards
errors and correcting the errors during the process of testing. The following are some
guidelines for testing:
i) Test the modules thoroughly, cover all the access paths, generate enough data
to cover all the access paths arising from conditions.
ii) Test the modules by deliberately processing/entering wrong data.
iii) Specifically create data for conditional statements. Enter data in test file, which
will satisfy the conditions and test the script again.
iv) Test for locking by invoking multiple concurrent processes.
The following are some of the strategies for testing: This involves design of test
cases. Test case is a set of designed data for which the system is tested. Two testing
strategies are present.
i) Code Testing: The code testing strategy examines the logic of the system. In
this, the analyst develops test cases for every instruction in the code. All the
paths in the program are tested. This test does not guarantee against software
failures. Also, it does not indicate whether the code is according to
requirements or not.
ii) Specification Testing: In this, testing with specific cases is performed. The
test cases are developed for each condition or combination of conditions and
submitted for processing.
The objective of testing is to design test cases that systematically uncover different
classes of errors and do so with the minimum amount of time and effort. Testing
cannot show the absence of errors. It can only find the presence of errors. The test
case design is as challenging as software development. Still, however effective the
design is, it cannot remove 100% errors. Even, the best quality software are not 100
% error free. The reliability of software is closely dependent on testing.
Some testing techniques are the black box and the white box methods.
White Box Testing: This method, also known as glass box testing, is performed
early in the testing process. Using this, the software engineer can derive tests that
guarantees exercises of all independent paths within the module at least once. It has
the following features:
i) Exercises all logical decisions on their true and false sides.
51
Elements of Project
Development
ii) Executes all loops at their boundaries and within their operational bounds.
iii) Exercises internal data structures to assure their validity.
Black Box Testing: This is applied during the later stage of testing. It enables the
software developer to derive a set of input conditions that will fully exercise the
functional requirements of a program. It enables him/her to detect errors like
incorrect or missing functions, interface errors, data structures or external data base
access errors and performance errors etc.
The following IEEE standards describe the standard practices on software test and
documentation:
829-1998 IEEE Standard for Software Test Documentation
1008-1987 (R1993) IEEE Standard for Software Unit Testing
1012-1998 IEEE Standard for Software Verification and Validation
Purpose
The purpose of this document and its intended audience are clearly stated.
Scope
Give an overview of testing process and major phases of the testing process. Specify
what is not covered in the scope of the testing such as, supporting or not third party
software.
Glossary
It defines technical terms used in this document.
References
Any references to other external documents stated in this document including references
to related project documents. They usually refer to the System Requirement
Specification and the System Design Specification documents.
Overview of Document
Describe the contents and organisation of the document.
Test Plan
A test plan is a document that describes the scope, approach, resources and schedule
of intended testing activities. It identifies test items, the features to be tested, the
testing tasks, and the person who will do each task, and any risks that require
contingency planning.
52
Software Engineering
Concepts and Standards
Schedules and Resources
An overview of the testing schedule in phases along with resources required for
testing is specified.
Recording of Tests
Specify the format to be used to record test results. It should very specifically name
the item to be tested, the person who did the testing, reference of the test process/data
and the results expected by that test, the data tested. If a test fails, the person
responsible for correcting and re-testing is also documented. The filled out format
would be kept with the specific testing schedule. A database could be used to keep
track of testing.
The summary of what has been tested successfully and the errors that still exist which
are to be rectified is specified.
Verification Testing
Unit Testing
For each unit/component, there must be a test, which will enable the tester to know
the accurate functioning of that unit.
Integration testing
Validation Testing
System Testing
This is top level integration testing. At this level, requirements are validated as
described in the SRS.
List test plans for acceptance testing or beta testing. During this test, real data is used
for testing by the development team (acceptance testing/alpha testing) or the
customer (beta testing). It describes how the results of such testing will be reported
and handled by the developers.
Login Screen
53
Elements of Project
Development
are found in the
User id must not be more database.
than 510 characters and it
should not contain any
special characters and no
spaces including in the
start.
…..
Test Log
3.9 SUMMARY
Software engineering covers the entire range of activities used to develop software.
The activities include requirements analysis, program development using some
recognised approach like structured programming, testing techniques, quality
assurance, management and implementation and maintenance. Further, software
engineering expects to address problems, which are encountered during software
development.
4. ISO/IEC: 18019: Guide lines for the design and preparation of user
documentation for application software.
54
Software Engineering
Concepts and Standards
7. http://www.rspa.com
8. http://www.ieee.org
9. http://standards.ieee.org
10. http://www.sce.carleton.ca/squall
11. http://en.tldp.org/HOWTO/Software-Release-Practice-
HOWTO/documentation.html
12. http://www.sei.cmu.edu/cmm/
55