




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Software engg
Typology: Lecture notes
1 / 213
This page cannot be seen from the preview
Don't miss anything!





























































































DEPT OF CSE & IT
DEPT OF CSE & IT
DISCLAIMER
THIS DOCUMENT DOES NOT CLAIM ANY ORIGINALITY AND
CANNOT BE USED AS A SUBSTITUTE FOR PRESCRIBED
TEXTBOOKS. THE INFORMATION PRESENTED HERE IS
MERELY A COLLECTION BY THE COMMITTEE MEMBERS FOR
THEIR RESPECTIVE TEACHING ASSIGNMENTS. VARIOUS
TEXT BOOKS AS WELL AS FREELY AVAILABLE MATERIAL
FROM INTERNET WERE CONSULTED FOR PREPARING THIS
DOCUMENT. THE OWNERSHIP OF THE INFORMATION LIES
WITH THE RESPECTIVE AUTHORS OR INSTITUTIONS.
DEPT OF CSE & IT
CONTENTS
Module 1:
Lecture 1: Introduction to Software Engineering
Lecture 2: Software Development Life Cycle- Classical Waterfall Model
Lecture 3: Iterative Waterfall Model, Prototyping Model, Evolutionary Model
Lecture 4: Spiral Model
Lecture 5: Requirements Analysis and Specification
Lecture 6: Problems without a SRS document, Decision Tree, Decision Table
Lecture 7: Formal System Specification
Lecture 8: Software Design
Lecture 9: Software Design Strategies
Lecture 10: Software Analysis & Design Tools
Lecture 11: Structured Design
Module 2:
Lecture 12: Object Modelling Using UML
Lecture 13: Use Case Diagram
Lecture 14: Class Diagrams
Lecture 15: Interaction Diagrams
Lecture 16: Activity and State Chart Diagram
DEPT OF CSE & IT
Module 3:
Lecture 17: Coding
Lecture 18: Testing
Lecture 19: Black-Box Testing
Lecture 20: White-Box Testing
Lecture 21: White-Box Testing (cont..)
Lecture 22: Debugging, Integration and System Testing
Lecture 23: Integration Testing
Lecture 24: Software Maintenance
Lecture 25: Software Maintenance Process Models
Lecture 26: Software Reliability and Quality Management
Lecture 27: Reliability Growth Models
Module 4:
Lecture 28: Software Quality
Lecture 29: SEI Capability Maturity Model
Lecture 30: Software Project Planning
Lecture 31: Metrics for Software Project Size Estimation
Lecture 32: Heuristic Techniques, Analytical Estimation Techniques
Lecture 33: COCOMO Model
Lecture 34: Intermediate COCOMO Model
Lecture 35: Staffing Level Estimation
DEPT OF CSE & IT
MODULE 1
LECTURE NOTE 1
INTRODUCTION TO SOFTWARE ENGINEERING
The term software engineering is composed of two words, software and engineering.
Software is more than just a program code. A program is an executable code, which serves some computational purpose. Software is considered to be a collection of executable programming code, associated libraries and documentations. Software, when made for a specific requirement is called software product.
Engineering on the other hand, is all about developing products, using well-defined, scientific principles and methods.
So, we can define software engineering as an engineering branch associated with the development of software product using well-defined scientific principles, methods and procedures. The outcome of software engineering is an efficient and reliable software product.
IEEE defines software engineering as: The application of a systematic, disciplined, quantifiable approach to the development, operation and maintenance of software.
We can alternatively view it as a systematic collection of past experience. The experience is arranged in the form of methodologies and guidelines. A small program can be written without using software engineering principles. But if one wants to develop a large software product, then software engineering principles are absolutely necessary to achieve a good quality software cost effectively.
Without using software engineering principles it would be difficult to develop large programs. In industry it is usually needed to develop large programs to accommodate multiple functions. A problem with developing such large commercial programs is that the complexity and difficulty levels of the programs increase exponentially with their sizes. Software engineering helps to reduce this programming complexity. Software engineering principles use two important techniques to reduce problem complexity: abstraction and decomposition****. The principle of abstraction implies that a problem can be simplified by omitting irrelevant details. In other words, the main purpose of abstraction is to consider only those aspects of the problem that are relevant for certain purpose and suppress other aspects that are not relevant for the given purpose. Once the simpler problem is solved, then the omitted details can be taken into consideration to solve the next lower level abstraction, and so on. Abstraction is a powerful way of reducing the complexity of the problem. The other approach to tackle problem complexity is
DEPT OF CSE & IT
decomposition. In this technique, a complex problem is divided into several smaller problems and then the smaller problems are solved one by one. However, in this technique any random decomposition of a problem into smaller parts will not help. The problem has to be decomposed such that each component of the decomposed problem can be solved independently and then the solution of the different components can be combined to get the full solution. A good decomposition of a problem should minimize interactions among various components. If the different subcomponents are interrelated, then the different components cannot be solved separately and the desired reduction in complexity will not be realized.
The need of software engineering arises because of higher rate of change in user requirements and environment on which the software is working.
Large software - It is easier to build a wall than to a house or building, likewise, as the size of software become large engineering has to step to give it a scientific process. Scalability- If the software process were not based on scientific and engineering concepts, it would be easier to re-create new software than to scale an existing one. Cost- As hardware industry has shown its skills and huge manufacturing has lower down the price of computer and electronic hardware. But the cost of software remains high if proper process is not adapted. Dynamic Nature- The always growing and adapting nature of software hugely depends upon the environment in which the user works. If the nature of software is always changing, new enhancements need to be done in the existing one. This is where software engineering plays a good role. Quality Management- Better process of software development provides better and quality software product.
A software product can be judged by what it offers and how well it can be used. This software must satisfy on the following grounds:
Operational Transitional Maintenance
DEPT OF CSE & IT
LECTURE NOTE 2
SOFTWARE DEVELOPMENT LIFE CYCLE
LIFE CYCLE MODEL
A software life cycle model (also called process model) is a descriptive and diagrammatic representation of the software life cycle. A life cycle model represents all the activities required to make a software product transit through its life cycle phases. It also captures the order in which these activities are to be undertaken. In other words, a life cycle model maps the different activities performed on a software product from its inception to retirement. Different life cycle models may map the basic development activities to phases in different ways. Thus, no matter which life cycle model is followed, the basic activities are included in all life cycle models though the activities may be carried out in different orders in different life cycle models. During any life cycle phase, more than one activity may also be carried out.
THE NEED FOR A SOFTWARE LIFE CYCLE MODEL
The development team must identify a suitable life cycle model for the particular project and then adhere to it. Without using of a particular life cycle model the development of a software product would not be in a systematic and disciplined manner. When a software product is being developed by a team there must be a clear understanding among team members about when and what to do. Otherwise it would lead to chaos and project failure. This problem can be illustrated by using an example. Suppose a software development problem is divided into several parts and the parts are assigned to the team members. From then on, suppose the team members are allowed the freedom to develop the parts assigned to them in whatever way they like. It is possible that one member might start writing the code for his part, another might decide to prepare the test documents first, and some other engineer might begin with the design phase of the parts assigned to him. This would be one of the perfect recipes for project failure. A software life cycle model defines entry and exit criteria for every phase. A phase can start only if its phase-entry criteria have been satisfied. So without software life cycle model the entry and exit criteria for a phase cannot be recognized. Without software life cycle models it becomes difficult for software project managers to monitor the progress of the project.
Different software life cycle models
Many life cycle models have been proposed so far. Each of them has some advantages as well as some disadvantages. A few important and commonly used life cycle models are as follows:
Classical Waterfall Model
DEPT OF CSE & IT
Iterative Waterfall Model Prototyping Model Evolutionary Model Spiral Model
1. CLASSICAL WATERFALL MODEL
The classical waterfall model is intuitively the most obvious way to develop software. Though the classical waterfall model is elegant and intuitively obvious, it is not a practical model in the sense that it cannot be used in actual software development projects. Thus, this model can be considered to be a theoretical way of developing software. But all other life cycle models are essentially derived from the classical waterfall model. So, in order to be able to appreciate other life cycle models it is necessary to learn the classical waterfall model. Classical waterfall model divides the life cycle into the following phases as shown in fig.2.1:
Fig 2.1: Classical Waterfall Model
Feasibility study - The main aim of feasibility study is to determine whether it would be financially and technically feasible to develop the product.
DEPT OF CSE & IT
Design: - The goal of the design phase is to transform the requirements specified in the SRS document into a structure that is suitable for implementation in some programming language. In technical terms, during the design phase the software architecture is derived from the SRS document. Two distinctly different approaches are available: the traditional design approach and the object-oriented design approach.
Traditional design approach - Traditional design consists of two different activities; first a structured analysis of the requirements specification is carried out where the detailed structure of the problem is examined. This is followed by a structured design activity. During structured design, the results of structured analysis are transformed into the software design. Object-oriented design approach -In this technique, various objects that occur in the problem domain and the solution domain are first identified, and the different relationships that exist among these objects are identified. The object structure is further refined to obtain the detailed design.
Coding and unit testing:- The purpose of the coding phase (sometimes called the implementation phase) of software development is to translate the software design into source code. Each component of the design is implemented as a program module. The end-product of this phase is a set of program modules that have been individually tested. During this phase, each module is unit tested to determine the correct working of all the individual modules. It involves testing each module in isolation as this is the most efficient way to debug the errors identified at this stage.
Integration and system testing: - Integration of different modules is undertaken once they have been coded and unit tested. During the integration and system testing phase, the modules are integrated in a planned manner. The different modules making up a software product are almost never integrated in one shot. Integration is normally carried out incrementally over a number of steps. During each integration step, the partially integrated system is tested and a set of previously planned modules are added to it. Finally, when all the modules have been successfully integrated and tested, system testing is carried out. The goal of system testing is to ensure that the developed system conforms to its requirements laid out in the SRS document. System testing usually consists of three different kinds of testing activities:
α – testing: It is the system testing performed by the development team. β – testing: It is the system testing performed by a friendly set of customers. Acceptance testing: It is the system testing performed by the customer himself after the product delivery to determine whether to accept or reject the delivered product.
System testing is normally carried out in a planned manner according to the system test plan document. The system test plan identifies all testing-related activities that must be performed,
DEPT OF CSE & IT
specifies the schedule of testing, and allocates resources. It also lists all the test cases and the expected outputs for each test case.
Maintenance: - Maintenance of a typical software product requires much more than the effort necessary to develop the product itself. Many studies carried out in the past confirm this and indicate that the relative effort of development of a typical software product to its maintenance effort is roughly in the 40:60 ratios. Maintenance involves performing any one or more of the following three kinds of activities: Correcting errors that were not discovered during the product development phase. This is called corrective maintenance. Improving the implementation of the system, and enhancing the functionalities of the system according to the customer’s requirements. This is called perfective maintenance. Porting the software to work in a new environment. For example, porting may be required to get the software to work on a new computer platform or with a new operating system. This is called adaptive maintenance.
Shortcomings of the classical waterfall model
The classical waterfall model is an idealistic one since it assumes that no development error is ever committed by the engineers during any of the life cycle phases. However, in practical development environments, the engineers do commit a large number of errors in almost every phase of the life cycle. The source of the defects can be many: oversight, wrong assumptions, use of inappropriate technology, communication gap among the project engineers, etc. These defects usually get detected much later in the life cycle. For example, a design defect might go unnoticed till we reach the coding or testing phase. Once a defect is detected, the engineers need to go back to the phase where the defect had occurred and redo some of the work done during that phase and the subsequent phases to correct the defect and its effect on the later phases. Therefore, in any practical software development work, it is not possible to strictly follow the classical waterfall model.
DEPT OF CSE & IT
Prototype
A prototype is a toy implementation of the system. A prototype usually exhibits limited functional capabilities, low reliability, and inefficient performance compared to the actual software. A prototype is usually built using several shortcuts. The shortcuts might involve using inefficient, inaccurate, or dummy functions. The shortcut implementation of a function, for example, may produce the desired results by using a table look-up instead of performing the actual computations. A prototype usually turns out to be a very crude version of the actual system.
Need for a prototype in software development
There are several uses of a prototype. An important purpose is to illustrate the input data formats, messages, reports, and the interactive dialogues to the customer. This is a valuable mechanism for gaining better understanding of the customer’s needs: how the screens might look like how the user interface would behave how the system would produce outputs
Another reason for developing a prototype is that it is impossible to get the perfect product in the first attempt. Many researchers and engineers advocate that if you want to develop a good product you must plan to throw away the first version. The experience gained in developing the prototype can be used to develop the final product. A prototyping model can be used when technical solutions are unclear to the development team. A developed prototype can help engineers to critically examine the technical issues associated with the product development. Often, major design decisions depend on issues like the response time of a hardware controller, or the efficiency of a sorting algorithm, etc. In such circumstances, a prototype may be the best or the only way to resolve the technical issues.
A prototype of the actual product is preferred in situations such as:
DEPT OF CSE & IT
Fig 3.2: Prototype Model
4. EVOLUTIONARY MODEL
It is also called successive versions model or incremental model. At first, a simple working model is built. Subsequently it undergoes functional improvements & we keep on adding new functions till the desired system is built.
Applications: Large projects where you can easily find modules for incremental implementation. Often used when the customer wants to start using the core features rather than waiting for the full software. Also used in object oriented software development because the system can be easily portioned into units in terms of objects. Advantages: User gets a chance to experiment partially developed system Reduce the error because the core modules get tested thoroughly. Disadvantages: It is difficult to divide the problem into several versions that would be acceptable to the customer which can be incrementally implemented & delivered.
DEPT OF CSE & IT
LECTURE NOTE 4
The Spiral model of software development is shown in fig. 4.1. The diagrammatic representation of this model appears like a spiral with many loops. The exact number of loops in the spiral is not fixed. Each loop of the spiral represents a phase of the software process. For example, the innermost loop might be concerned with feasibility study, the next loop with requirements specification, the next one with design, and so on. Each phase in this model is split into four sectors (or quadrants) as shown in fig. 4.1. The following activities are carried out during each phase of a spiral model.
Fig 4.1: Spiral Model
First quadrant (Objective Setting)
DEPT OF CSE & IT
Second Quadrant (Risk Assessment and Reduction)
Circumstances to use spiral model
The spiral model is called a meta model since it encompasses all other life cycle models. Risk handling is inherently built into this model. The spiral model is suitable for development of technically challenging software products that are prone to several kinds of risks. However, this model is much more complex than the other models – this is probably a factor deterring its use in ordinary projects.
Comparison of different life-cycle models
The classical waterfall model can be considered as the basic model and all other life cycle models as embellishments of this model. However, the classical waterfall model cannot be used in practical development projects, since this model supports no mechanism to handle the errors committed during any of the phases.
This problem is overcome in the iterative waterfall model. The iterative waterfall model is probably the most widely used software development model evolved so far. This model is simple to understand and use. However this model is suitable only for well-understood problems; it is not suitable for very large projects and for projects that are subject to many risks.
The prototyping model is suitable for projects for which either the user requirements or the underlying technical aspects are not well understood. This model is especially popular for development of the user-interface part of the projects.