Software Engineering
Software Engineering
A Complete Manual Of
Software Engineering
BE Computer (Seventh Semester) New Syllabus
2014
Prepared By:
Er. Ganesh Ram Suwal
Lecturer
Khwopa Engineering College
1|Page
Compiled By: Er. Ganesh Ram Suwal
Software Engineering
BEG 472CO
Year VI Semester: I
COURSE OBJECTIVES:
This course is intended to provide an introduction to SE concepts and practices focusing on industrial software
development characteristics and processes, development models, and the software life cycle for mid-scale
system.
Provide students a comprehensive introduction to software engineering. provide the students the kinds of
activities that are necessary for developing a software system
Study the important phases of software development
UNIT I: (4 hrs)
Introduction to Software Engineering:
Definition of Software engineering
The evolving role of software
Changing Nature of Software
Characteristics of Software
A Generic view of software Engineering
Software engineering- layered technology.
2|Page
Compiled By: Er. Ganesh Ram Suwal
UNIT V: (7 hrs)
Software Design
Introduction to Software Design
Characteristics of a good Software Design
Design Principal
Design concepts
Design Strategy
Design process and Design quality
Software Architecture and its types
3|Page
Compiled By: Er. Ganesh Ram Suwal
Case Studies
Students are encouraged to perform the case study to implement concepts of above- mentioned topics.
4|Page
Compiled By: Er. Ganesh Ram Suwal
References:
1. Software Engineering, A practitioner’s Approach-Roger S. Pressman, 6th edition.McGrawHill International
Edition.
2. Software Engineering- Sommerville, 7th edition, Pearson education.2004
3. Software Engineering (Latest Edition), Udit Agrawal
4. Fundamentals of Software Engineering (Latest Edition), Rajib Malla
5. Software Engineering – A precise Approach (Latest Edition), Pankaj Jalote
5|Page
Compiled By: Er. Ganesh Ram Suwal
6|Page
Compiled By: Er. Ganesh Ram Suwal
7|Page
Compiled By: Er. Ganesh Ram Suwal
Small wall: use common sense bringing bricks, cements. Building a small wall and building a large building are
entirely different. You can use your intuition and still be successful in building a small wall, but building a large
building requires knowledge of civil, architectural and other engineering principles. The Small walls are very
simple to build but multi storyed building is very difficult. That means the complexity is getting increased.
Software Engineering is about the managing the complexity in Software.
8|Page
Compiled By: Er. Ganesh Ram Suwal
System Engineering
System Engineering concerned with all aspects of computer-based systems development including Hardware
development, policy and process design and system deployment as well as software engineering. System
engineers are involved in system specification, architectural design, integration and deployment. System
9|Page
Compiled By: Er. Ganesh Ram Suwal
Engineering is about the services that the system provides the constraints under which the system must be
built and operated and the interaction of the system with its environment.
Software Characteristics
1. Software does not wear out
Well understood with the help of bath tub curve. There are three phases in the life of a h/w product
Initial phase is burn-in phase, where failure intensity is high. It is expected to test the product in the industry
before delivery. Due to testing and fixing problems, failure intensity will come down initially.
The second phase is the useful life phase where the failure intensity is approx. constant and called the useful
life of a product.
Third Phase: After few years, again failure intensity will increase due to wearing out of components, called
wear out phase. H/w components suffer from the cumulative effects of dust, vibration, abuse, temperature,
environmental maladies.
10 | P a g e
Compiled By: Er. Ganesh Ram Suwal
• During life, software will undergo change. As changes are made, it is likely that errors will be introduced,
causing the failure rate curve to spike as in figure.
• Before the curve can return to the original steady state, another change is requested, causing the curve to
spike again.
• Slowly, minimum failure rate level begins to rise-the software is deteriorating due to change.
Software Process
Set of activities and associated results that produce the software product. Software process is the way in
which we produce software. These activities are carried out by SEs. Four fundamental process activities are
common to all software process
1. Specification
2. Development
3. Validation
4. Evolution
11 | P a g e
Compiled By: Er. Ganesh Ram Suwal
12 | P a g e
Compiled By: Er. Ganesh Ram Suwal
2. Y2K problem
It was simply the ignorance about the adequacy or otherwise of using only last two digits of the year.
Reason
The 4-digit date format, like 1964, was shortened to 2-digit format, like 64.
13 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Software must evolve to meet changing needs. This is a critical attribute coz software change is an inevitable
consequence of a changing business environment.
2. Dependability
Software must be trustworthy. It has a range of sub attributes as reliability, security and safety. Dependable
software should not cause physical or economical damage in the event of system failure.
3. Efficiency
Software should not make wasteful use of system resources such as memory, processor and storage. So it
includes responsiveness, processing time, and memory utilization.
4. Usability
Software becomes usable if it does not call for extra effort to be learnt. Usability increases with good
documentation and an appropriate user interface.
14 | P a g e
Compiled By: Er. Ganesh Ram Suwal
15 | P a g e
Compiled By: Er. Ganesh Ram Suwal
“The period of time that starts when a software product is conceived and ends when the product is no longer
available for use. The software life cycle typically includes a requirement phase, design phase, implementation
phase, test phase, installation and check out phase, operation and maintenance phase, and sometimes
retirement phase”.
16 | P a g e
Compiled By: Er. Ganesh Ram Suwal
17 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Iteration Model
The rapid application development model emphasizes on delivering projects in small pieces. If the project is
large, it is divided into a series of smaller projects. Each of these smaller projects is planned and delivered
individually. Thus, with a series of smaller projects, the final project is delivered quickly and in a less structured
18 | P a g e
Compiled By: Er. Ganesh Ram Suwal
manner. The major characteristic of the RAD model is that it focuses on the reuse of code, processes,
templates, and tools.
19 | P a g e
Compiled By: Er. Ganesh Ram Suwal
4. Repeat analysis and prototyping as necessary: When the prototype is developed, it is sent to the user for
evaluating its functioning. After the modified requirements are available, the prototype is updated
according to the new set of requirements and is again sent to the user for analysis.
5. Conclusion of prototyping: As a prototype is an iterative process, the project manager and user agree on a
fixed number of processes. Ideally, three iterations are considered. After the third iteration, additional
tasks for developing the software are performed and then tested. Last of all, the tested software is
implemented.
6. Implementation: The developed software, which is fully functioning, is deployed at the user's end.
3. Evolutionary Model
Evolutionary models are inherently iterative in nature. It helps to develop increasingly more complete versions
of the target software
20 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Business and product requirement changes as the development proceeds Straight path to end product
becomes unrealistic
Tight market deadline Limited version to be introduced
System requirements are well understood but details of product extensions or system extensions are not
known
21 | P a g e
Compiled By: Er. Ganesh Ram Suwal
1. Requirements gathering and analysis: A prototyping model begins with requirements analysis and the
requirements of the system are defined in detail. The user is interviewed in order to know the requirements of
the system.
2. Quick design: When requirements are known, a preliminary design or quick design for the system is
created. It is not a detailed design and includes only the important aspects of the system, which gives an idea
of the system to the user. A quick design helps in developing the prototype.
3. Build prototype: Information gathered from quick design is modified to form the first prototype, which
represents the working model of the required system.
4. User evaluation: Next, the proposed system is presented to the user for thorough evaluation of the
prototype to recognize its strengths and weaknesses such as what is to be added or removed. Comments and
suggestions are collected from the users and provided to the developer.
5. Refining prototype: Once the user evaluates the prototype and if he is not satisfied, the current prototype
is refined according to the requirements. That is, a new prototype is developed with the additional
information provided by the user. The new prototype is evaluated just like the previous prototype. This
process continues until all the requirements specified by the user are met. Once the user is satisfied with the
developed prototype, a final system is developed on the basis of the final prototype.
6. Engineer product: Once the requirements are completely met, the user accepts the final prototype. The
final system is evaluated thoroughly followed by the routine maintenance on regular basis for preventing
large-scale failures and minimizing downtime.
22 | P a g e
Compiled By: Er. Ganesh Ram Suwal
23 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Each region is populated by a series of tasks specific to the nature of the project. In all cases, umbrella
activities are applied (SCM and SQA)
All the stages iterative in nature:
24 | P a g e
Compiled By: Er. Ganesh Ram Suwal
25 | P a g e
Compiled By: Er. Ganesh Ram Suwal
1. Avoids the problems resulting in risk-driven approach in the 1. Assessment of project risks and its
software resolution is not an easy task.
2. Specifies a mechanism for software quality assurance activities 2. Difficult to estimate budget and
3. Is utilized by complex and dynamic projects schedule in the beginning as some
4. Re-evaluation after each step allows changes in user of the analysis is not done until the
perspectives, technology advances, or financial perspectives. design of the software is
5. Estimation of budget and schedule gets realistic as the work developed.
progresses.
3.3 Win-Win Spiral Model
The Spiral model suggests customer communication to decide upon project requirements form customer and
the Developer asks what is required and customer provides necessary details. In reality, developer negotiates
with customer for functionality, performance, and other product / system features against cost and time to
market. Negotiation is successful at Win-Win state:
Customer wins by getting a product /system that satisfies majority of his requirements
Developer wins by deadline target and achievable budget
Negotiation takes place at the beginning of each pass around the spiral, involving the following activities:
Identification of the key stake holders of the system/sub systems
Determination of the stake holder’s win condition
26 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Negotiation of the stake holder’s win condition to fit into a set of Win-Win condition
for all concerned (including software development project team)
Representation:
Any state of a concurrent process model can be represented schematically as a series of major technical
activities, tasks and associated states e.g. analysis, activity can be represented as shown
All activities resides concurrently but resides in different states
For a Spiral Model:
When customer communication activity completed the first iteration and is in state three the analysis
activity makes a transition from state one to state two.
27 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Now as a part of customer communication activity , the customer signals a change in requirement ,
analysis activity makes a move to state three
Concurrent process model defines a series of events that will trigger transition from state to state for each
software engineering activity
In general this model is used as a paradigm for client server applications which comprises of a set of functional
components
Concurrent development model defines client/server applications in two dimensions:
System Dimensions: involves three activities (design, assembly, use)
Component dimensions: involves two activities (design and realization)
Concurrency is achieved in two ways:
i. System and component activities can be concurrently taking place (a state oriented approach)
ii. Design and realization of many components can take place concurrently
Comments:
Applicable to all types of software developments
Helps to figure out the actual picture of the state of the project
Instead of showing software engineering activities as a sequence of tasks it defines a network of activities
existing simultaneous with other activities
Events generated in one activity may trigger a state transition of an activity
28 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Accomplished by examining the data that are to be manipulated by the application and the algorithms
that will be applied to accomplish manipulation these data and code are packaged to form a software
component or a class
Old classes are stored in class libraries
This model leads to software reuse
Reusability provides measurable benefits to software engineering processes
QSM Inc. report indicates:
70% reduction in development cycle time
84% reduction in project cost
26.2% productivity index versus 16.9 as industry norm
29 | P a g e
Compiled By: Er. Ganesh Ram Suwal
produce the SRS, Which describes the complete behavior of the proposed software. SRS is also helping the
clients to understand their own needs.
Advantages
Software SRS establishes the basic for agreement between the client and the supplier on what the software
product will do.
1. A SRS provides a reference for validation of the final product.
2. A high-quality SRS is a prerequisite to high-quality software.
3. A high-quality SRS reduces the development cost.
Characteristics of an SRS
1. Correct
2. Complete
3. Unambiguous
4. Verifiable
5. Consistent
6. Ranked for importance and/or stability
7. Modifiable
8. Traceable
30 | P a g e
Compiled By: Er. Ganesh Ram Suwal
WHY IS IT IMPORTANT ?
Building a Computer Software is a complex undertaking, particularly if it involves many people working over a
relatively long time. That’s why Software Projects need to be managed.
31 | P a g e
Compiled By: Er. Ganesh Ram Suwal
THE PEOPLE
• The People Factor is so important that Software Engineering institution has developed a People
Management Capability Maturity Model. (PM-CMM).
• PM-CMM Defines the following key practice areas for Software People:-
-Recruiting
- Selection
- Performance Management
- Training
- Compensation
- Career Development
- Organization and work Design
- Team Culture Development
Organizations that achieve high level of Maturity in People Management area have a higher likelihood of
implementing effective Software Engineering Practices.
32 | P a g e
Compiled By: Er. Ganesh Ram Suwal
THE PROCESS
Software Process provides the Framework from which a comprehensive Plan for Software
Development can be established.
A small number of Framework activities are applicable to all Software Projects regardless of Project
size or complexity.
A number of Different Task set however, such as:-
- Tasks
- Milestones
- Work Product (Deliverables)
- Quality Assurance points enable the Framework activities to be adapted to the
characteristics of the Software Project and the requirements of the Project team.
THE PROJECT
• Software Project Development is conducted in a Planned and Controlled way since it is only known way
to manage complexity. And yet we still struggle.
• In 1998 industry data indicated that 26% of Project failed outright and 46% experienced Cost and
Schedule overruns.
Although Project success rate for Projects has improved, yet Project failure rate remains higher than it
should be!
33 | P a g e
Compiled By: Er. Ganesh Ram Suwal
COCOMO Model
The Constructive cost model (COCOMO) was developed by Boehm. This model also estimates the total effort
in terms of person-months of the technical project staff. The effort estimate includes development,
management, and support tasks but does not include the cost of the secretarial and other staff that might be
needed in an organization. The basic steps in this model are: -
The COstructive COst MOdel (COCOMO) is the most widely used software estimation model in the world. It
The COCOMO model predicts the effort and duration of a project based on inputs relating to the size of the
resulting systems and a number of "cost drives" that affect productivity.
34 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Effort:
• Effort Equation
– PM = C * (KDSI)n (person-months)
• where PM = number of person-month (=152 working hours),
• C = a constant,
• KDSI = thousands of "delivered source instructions" (DSI) and
• n = a constant.
Productivity:
• Productivity equation
– (DSI) / (PM)
• where PM = number of person-month (=152 working hours),
• DSI = "delivered source instructions"
Schedule:
• Schedule equation
– TDEV = C * (PM)n (months)
– Where TDEV = number of months estimated for software development.
Average Staffing:
• Average Staffing Equation
– (PM) / (TDEV) (FSP)
– Where FSP means Full-time-equivalent Software Personnel.
COCOMO Models
35 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Risk Management
Any large project involves certain risks, and that is true for software projects. Risk management is an emerging
area that aims to address the problem of identifying and managing the risks associated with a software
project.
Risk is a project of the possibility that the defined goals are not met. The basic motivation of having risk
management is to avoid disasters and heavy losses. The current interest in risk management is due to the fact
that the history of software development projects is full of major and minor failures. A large percentage of
projects have run considerably over budget and behind schedule, and many of these have been abandoned
midway. It is now argued that many of these failures were due to the fact that the risks were not identified
and managed properly.
36 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Risk management is an important area, particularly for large projects. Like any management activity, proper
planning of that activity is central to success. Here we discuss various aspects of risk management and
planning.
37 | P a g e
Compiled By: Er. Ganesh Ram Suwal
38 | P a g e
Compiled By: Er. Ganesh Ram Suwal
39 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Software configuration management (SCM) is the discipline for systematically controlling the changes that
take place during development. Software configuration management is a process independent of the
development process largely because most development models cannot accommodate change at any time
during development. SCM can be considered as having three major components:
1. Software configuration identification
2. Change control
3. Status accounting and auditing
1. Configuration identification:
The first requirement for any change management is to have clearly agreed-on basis for change. That is, when
a change is done, it should be clear to what changes has been applied. This requires baselines to be
established. A baseline change is the changing of the established baseline, which is controlled by SCM.
After baseline changes the state of the software is defined by the most recent baseline and the changes that
were made. Some of the common baselines are functional or requirements baseline, design baseline, and
product or system baseline. Functional or requirement baseline is generally the requirements document that
specifies the functional requirements for the software. Design baseline consists of the different components in
the software and their designs. Product or system baseline represents the developed system.
It should be clear that a baseline is established only after the product is relatively stable. Though the goal of
SCM is to control the establishment and changes to these baselines, treating each baseline as a single unit for
the purpose of change is undesirable, as the change may be limited to a very small portion of the baseline.
2. Change control:
Most of the decisions regarding the change are generally taken by the configuration control board (CCB),
which is a group of people responsible for configuration management, headed by the configuration manager.
For smaller projects, the CCB might consist of just one person. A change is initiated by a change request.
The reason for change can be anything. However, the most common reasons are requirement changes,
changes due to bugs, platform changes, and enhancement changes. The CR for change generally consists of
three parts. The first part describes the change, reason for change, the SCIs that are affected, the priority of
the change, etc.
40 | P a g e
Compiled By: Er. Ganesh Ram Suwal
The second part, filled by the CM, describes the decision taken by the CCB on this CR, the action the CM feels
need to be done to implement this change and any other comments the CM may have. The third part is filled
by the implementer, which later implements the change.
41 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Figure: The analysis model as a bridge between System and design model
Requirements set out what the system should do and define constraints on its operation and implementation.
The Requirement engineering occurs during the customer communication and modelling activities that we
have defined for the generic software process. Seven distinct requirement engineering functions are
1. Inception – How does the software project get started?
2. Elicitation – Ask the customer, the user what the objectives of the system or a product?
Why requirements elicitation is difficult:
Problems of scope: define the boundary of the problem
Problem of understanding: The customers/users are not completely sure of what is needed, have a poor
understanding of the capabilities and limitations of their computing environment, don’t have a full
understanding of the problem domain, have trouble communicating needs to the system engineer, omit
information that is believed to be “obvious,” specify requirements that conflict with the needs of other
customers/users, or specify requirements that are ambiguous or untestable.
42 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Functional Requirement:
Functional requirements set out services the system should provide. (Describe functionality or system
services.)
Depend on the type of software, expected users and the type of system where the software is used.
Functional user requirements may be high-level statements of what the system should do but functional
system requirements should describe the system services in detail.
43 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Non-functional requirements
Non-functional requirements constrain the system being developed or the development process.
These define system properties and constraints e.g. reliability, response time and storage requirements.
Constraints are I/O device capability, system representations, etc.
Process requirements may also be specified mandating a particular CASE system, programming language or
development method.
Non-functional requirements may be more critical than functional requirements. If these are not met, the
system is useless.
Non-functional classifications
1. Product requirements
Requirements which specify that the delivered product must behave in a particular way e.g. execution speed,
reliability, etc.
2. Organisational requirements
Requirements which are a consequence of organisational policies and procedures e.g. process standards used,
implementation requirements, etc.
3. External requirements
Requirements which arise from factors which are external to the system and its development process e.g.
interoperability requirements, legislative requirements, etc.
44 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Non-functional
requir ements
System requirements
System requirements are intended to communicate the functions that the system should provide. System
requirement are derived from user requirement. The user system requirements are the parts of software
requirement and specification (SRS) document.
45 | P a g e
Compiled By: Er. Ganesh Ram Suwal
between the business people defining the requirements for a computer system and the technical people
defining the design in response to those requirements. They are used to show the data needed and created by
business processes.
The data model consists of three interrelated pieces of information: the data object, the attributes that
describe the data object, and the relationships that connect data objects to one another.
Data objects. A data object is a representation of almost any composite information that must be understood
by software.
Context diagram
The context diagram helps to define our system boundary to show what is included in, and what is excluded
from, our system.
46 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Process
a process is a business activity or function where the manipulation and transformation of data takes place. A
process can be decomposed to finer level of details, for representing how data is being processed within the
process.
Data Store
A data store represents the storage of persistent data required and/or produced by the process. Here are
some examples of data stores: membership forms, database table, etc.
47 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Data Flow
a data flow represents the flow of information, with its direction represented by an arrow head that shows at
the end(s) of flow connector.
Payment
Employee record
48 | P a g e
Compiled By: Er. Ganesh Ram Suwal
49 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Context diagram
(level 0 DFD)
Level 1 DFD
Level 2 DFD
Data flow diagrams usually occur in sets. The set consist of different levels.
In this DFD (level 0 DFD) no processes or data stores are shown.
Another diagram (level 1 DFD) is now developed which shows the processes taking place to convert the inputs
shown in the context diagram to the outputs. In this DFD detail is given to show which processes are
responsible for accepting the different inputs and producing the different outputs. Any process shown that is
complicated by a number of data flows and requires further refinement is shown on another diagram (level 2
DFD) where sub-processes are shown together with any necessary extra data stores.
50 | P a g e
Compiled By: Er. Ganesh Ram Suwal
UML
The Unified Modeling Language (UML) is a standard language for writing software blueprints. The UML may be
used to visualize, specify, construct, and document the artifacts of a software intensive system.
UML provides a wide array of diagrams that can be used for analysis and design at both the system and
software level. Developed by the “Three Amigos”: Grady Booch, Jim Rumbaugh, Ivar Jacobson
The UML is appropriate for modeling systems ranging from enterprise information systems to distributed
Web-based applications and even to hard real time embedded systems. It is a very expressive language,
addressing all the views needed to develop and then deploy such systems.
Even though it is expressive, the UML is not difficult to understand and to use. Learning to apply the UML
effectively starts with forming a conceptual model of the language, which requires learning three major
elements: the UML's basic building blocks, the rules that dictate how these building blocks may be put
together, and some common mechanisms that apply throughout the language.
The UML is only a language and so is just one part of a software development method. The UML is process
independent, although optimally it should be used in a process that is use case driven, architecture-centric,
iterative, and incremental.
51 | P a g e
Compiled By: Er. Ganesh Ram Suwal
· Constructing – Model are map using programming language like JAVA, C++ or VB6 etc
· Documenting – UML provides a language for expressing requirements and for tests. UML also provides a
language for modeling the activities of project planning and release management.
A modeling language is a language whose vocabulary and rules focus on the conceptual and physical
representation of a system. A modeling language such as the UML is thus a standard language for software
blueprints.
The goal of UML is to provide a standard notation that can be used by all object oriented methods. Actually
system development focuses on three different models
1. Functional model : Use case diagram
2. Object model : class diagram
3. Dynamic model: interaction diagram, statechart diagrams and activity diagrams.
52 | P a g e
Compiled By: Er. Ganesh Ram Suwal
1. Things – Things are the abstractions that you use to write well formed models. They are the basic object
oriented building blocks of UML.
2. Relationships
3. Diagrams
2. Associations
An association is a structural relationship that describes a set of links, a link being a connection among objects.
Aggregation is a special kind of association, representing a structural relationship between a whole and its
parts. Graphically, an association is rendered as a solid line, possibly directed, occasionally including a label,
and often containing other adornments, such as multiplicity and role names,
53 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Fig: Association
3. Generalizations
A generalization is a specialization/generalization relationship in which objects of the specialized element (the
child) are substitutable for objects of the generalized element (the parent). In this way, the child shares the
structure and the behavior of the parent. Graphically, a generalization relationship is rendered as a solid line
with a hollow arrowhead pointing to the parent.
Fig: generalization
4. Realizations
54 | P a g e
Compiled By: Er. Ganesh Ram Suwal
A realization is a semantic relationship between classifiers, wherein one classifier specifies a contract that
another classifier guarantees to carry out. You'll encounter realization relationships in two places: between
interfaces and the classes or components that realize them, and between use cases and the collaborations
that realize them. Graphically, a realization relationship is rendered as a cross between a generalization and a
dependency relationship.
Fig: realization
1. Structural Things
Structural things are the nouns of UML models. These are the mostly static parts of a model, representing
elements that are either conceptual or physical. In all, there are seven kinds of structural things. Structural
things are
1.1 Class
1.2 Interface
1.3 Collaboration
1.4 Use Case
1.5 Active Class
1.6 Component
1.7 Node
1.1 Class: It is a description of set of objects that share the same attributes, operation, relationship and semantics.
55 | P a g e
Compiled By: Er. Ganesh Ram Suwal
1.2 Interface: it is collection of operations that specify a service of a class or component. It describe an externally
visible behavior of that element. It may represent the complete behavior of a class or component or only a
part of that behavior, it defines a set of operation specifications (i.e their signatures) but never a set of
operation implementation.
1.3 Collaboration: it defines and interaction. It is a society of roles and other element that work together to
provide some cooperative behavior that is bigger than the sum of all the elements. So collaboration diagram
have structural behavior as well as behavioral dimensions. A given class might be participating in several
collaborations.
1.4 Use Case: it is a description of set of sequence of actions that a system performs that yield an observable
result of value to a particular actor. A use case is used to structure the behavioral things in a model. A use case
is realized by collaboration.
1.5 Active Class: it is a class whose object own one or more processes or threads and thus can initiate control
activity.
1.6 Component: it is physical and replaceable part of a system that conforms to and provides the realization of a
set of interface. It is physical packaging of other logical elements like classes, interfaces and collaborations.
1.7 Node: it is a physical element that represents computational resources that has some memory and some
processing capability.
2. Behavioral Things
56 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Behavioral things are the dynamic parts of UML models. These are the verbs of a model, representing
behavior over time and space. In all, there are two primary kinds of behavioral things.
2.1 Interaction
2.2 State Machine
2.1 interactions: it is a behavior that comprises of a set of message exchange among a set of objects within a
particular context to accomplish a specific purpose. It involves a number of other elements like messages,
action sequences and links.
2.2 State Machine: it is a behavior that specifies the sequences of states an object or interaction goes through
during its life time in response to events together with its responses to those events. A state machine involves
a number of other elements including states, transitions, events and activities.
3. Grouping Things
Grouping things are the organizational parts of UML models. These are the boxes into which a model can be
decomposed. In all, there is one primary kind of grouping thing, namely, packages.
3.1 Package
3.1 Package: A package is a general-purpose mechanism for organizing elements into groups.
Package = Structural things + behavioral things + annotational things
4. Annotational Things
57 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Annotational things are the explanatory parts of UML models. These are the comments you may apply to
describe, illuminate, and remark about any element in a model. There is one primary kind of annotational
thing, called a note. A note is simply a symbol for rendering constraints and comments attached to an element
or a collection of elements. Graphically, a note is rendered as a rectangle with a dog-eared corner, together
with a textual or graphical comment.
4.1 Notes
Diagrams in UML
It is a graphical presentation of a set of elements. It is also connected graph vertices (things) and arcs
(relationship). The diagrams are used to visualize the system so diagrams are the projection of a system.
UML includes nine such diagrams:
a. Structural Diagram or static diagram
1. Class diagram
2. Object diagram
3. Component diagram
4. Sequence diagram
5. Deployment diagram
b. Behavioral Diagrams or dynamic diagrams
1. Statechart diagram
2. Activity diagram
3. Use case diagram
4. Collaboration diagram
58 | P a g e
Compiled By: Er. Ganesh Ram Suwal
1. Class diagrams
A class diagram shows a set of classes, interfaces, and collaborations and their relationships. These diagrams
are the most common diagram found in modeling object-oriented systems. Class diagrams address the static
design view of a system. Class diagrams that include active classes address the static process view of a system.
Classes are the most important building block of any object-oriented system. A class is a description of a set of
objects that share the same attributes, operations, relationships, and semantics. A class implements one or
more interfaces. A class name must be unique within its enclosing package,
59 | P a g e
Compiled By: Er. Ganesh Ram Suwal
With the UML, you use class diagrams to visualize the static aspects of these building blocks and their
relationships and to specify their details for construction. Graphically, a class diagram is a collection of vertices
and arcs.
Class diagrams commonly contain the following things:
Classes
Interfaces
Collaborations
Dependency, generalization, and association relationships
Like all other diagrams, class diagrams may contain notes and constraints. Class diagrams may also contain
packages or subsystems, both of which are used to group elements of your model into larger chunks.
Sometimes, you'll want to place instances in your class diagrams, as well, especially when you want to
visualize the (possibly dynamic) type of an instance.
60 | P a g e
Compiled By: Er. Ganesh Ram Suwal
2. Object diagrams
An object diagram shows a set of objects and their relationships. Object diagrams represent static snapshots
of instances of the things found in class diagrams. These diagrams address the static design view or static
process view of a system as do class diagrams, but from the perspective of real or prototypical cases.
61 | P a g e
Compiled By: Er. Ganesh Ram Suwal
62 | P a g e
Compiled By: Er. Ganesh Ram Suwal
63 | P a g e
Compiled By: Er. Ganesh Ram Suwal
4. Interaction diagrams
Both sequence diagrams and collaboration diagrams are kinds of interaction diagrams. It shows an interaction,
consisting of a set of objects and their relationships, including the messages that may be dispatched among
them. Interaction diagrams address the dynamic view of a system. A sequence diagram is an interaction
diagram that emphasizes the time-ordering of messages;
Interaction Diagram = Sequence diagram + Collaboration diagram
64 | P a g e
Compiled By: Er. Ganesh Ram Suwal
65 | P a g e
Compiled By: Er. Ganesh Ram Suwal
5. Collaboration Diagram
A collaboration diagram is an interaction diagram that emphasizes the structural organization of the objects
that send and receive messages. Sequence diagrams and collaboration diagrams are isomorphic, meaning that
you can take one and transform it into the other.
6. Statechart diagrams
A statechart diagram shows a state machine, consisting of states, transitions, events, and activities. Statechart
diagrams address the dynamic view of a system. They are especially important in modeling the behavior of an
interface, class, or collaboration and emphasize the event-ordered behavior of an object, which is especially
useful in modeling reactive systems.
7. Activity diagrams
An activity diagram is a special kind of a statechart diagram that shows the flow from activity to activity within
a system. Activity diagrams address the dynamic view of a system. They are especially important in modeling
the function of a system and emphasize the flow of control among objects.
66 | P a g e
Compiled By: Er. Ganesh Ram Suwal
8. Component diagrams
A component diagram shows the organizations and dependencies among a set of components. Component
diagrams address the static implementation view of a system. They are related to class diagrams in that a
component typically maps to one or more classes, interfaces, or collaborations.
9. Deployment diagrams
A deployment diagram shows the configuration of run-time processing nodes and the components that live on
them. Deployment diagrams address the static deployment view of architecture. They are related to
component diagrams in that a node typically encloses one or more components.
67 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Determine basic requirements including the input and output information desired. Details, such as
security, can typically be ignored.
2. Develop Initial Prototype
The initial prototype is developed that includes only user interfaces. (See Horizontal Prototype, below)
3. Review
The customers, including end-users, examine the prototype and provide feedback on additions or
changes.
4. Revise and Enhance the Prototype
Using the feedback both the specifications and the prototype can be improved. Negotiation about
what is within the scope of the contract/product may be necessary. If changes are introduced then a
repeat of steps #3 and #4 may be needed.
Advantages of prototyping
1. Reduced time and costs: Prototyping can improve the quality of requirements and specifications provided
to developers. Because changes cost exponentially more to implement as they are detected later in
development, the early determination of what the user really wants can result in faster and less expensive
software.
2. Improved and increased user involvement: Prototyping requires user involvement and allows them to see
and interact with a prototype allowing them to provide better and more complete feedback and
specifications. The presence of the prototype being examined by the user prevents many
misunderstandings and miscommunications that occur when each side believe the other understands
what they said. Since users know the problem domain better than anyone on the development team does,
increased interaction can result in final product that has greater tangible and intangible quality. The final
product is more likely to satisfy the user's desire for look, feel and performance.
Dimensions of prototypes
3. Horizontal Prototype
A common term for a user interface prototype is the horizontal prototype. It provides a broad view of an
entire system or subsystem, focusing on user interaction more than low-level system functionality, such as
database access. Horizontal prototypes are useful for:
Confirmation of user interface requirements and system scope
68 | P a g e
Compiled By: Er. Ganesh Ram Suwal
69 | P a g e
Compiled By: Er. Ganesh Ram Suwal
A Process is a set of related and (sequenced) tasks that transforms a set of input to a set of output. Software
design is more creative than analysis. So it is a problem solving activity.
The output of software design is Software Design Document (SDD).
Software designers do not arrive at a finished design immediately. They develop design iteratively through
number of different versions. The starting point is informal design which is refined by adding information to
make it consistent and complete as shown in the figure below:
70 | P a g e
Compiled By: Er. Ganesh Ram Suwal
As a design is decomposed, errors and omissions in earlier stages are discovered. These feed back to allow
earlier design models to be improved.
A specification for the next stage is the output of each design activity.
The final results of the process are precise specifications of the algorithms and data structures to be
implemented.
Design activities can be broadly classified into two important parts:
• Preliminary (or high-level) design and
• Detailed design.
High-level design means identification of different modules and the control relationships among them and the
definition of the interfaces among these modules. The outcome of high-level design is called the program
structure or software architecture.
During detailed design, the data structure and the algorithms of the different modules are designed. The
outcome of the detailed design stage is usually known as the module-specification document.
71 | P a g e
Compiled By: Er. Ganesh Ram Suwal
72 | P a g e
Compiled By: Er. Ganesh Ram Suwal
System level
Sub-system
level
A top down design approach starts by identifying the major modules of the system, decomposing them into
their lower level modules and iterating until the desired level of detail is achieved. This is stepwise refinement;
starting from an abstract design, in each step the design is refined to a more concrete level, until we reach a
level where no more refinement is needed and the design can be implemented directly.
Bottom-Up Design
Hybrid Design
For top-down approach to be effective, some bottom-up approach is essential for the following reasons:
_ to permit common sub modules.
74 | P a g e
Compiled By: Er. Ganesh Ram Suwal
_ near the bottom of the hierarchy, where the intuition is simpler, and the need for bottom-up testing is
greater, because there is more number of modules at low levels than high levels.
_ in the use of pre-written library modules, in particular, reuse of modules.
75 | P a g e
Compiled By: Er. Ganesh Ram Suwal
4. Software Architecture: Software architecture alludes to “the overall structure of the software and the ways
in which that structure provides conceptual integrity for a system”
5. Control Hierarchy: Control hierarchy, also called program structure, represents the organization of
program components (modules) and implies a hierarchy of control.
6. Structural Partitioning: If the architectural style of a system is hierarchical, the program structure can be
partitioned both horizontally and vertically. Referring to Figure 13.4a, horizontal partitioning defines
separate branches of the modular hierarchy for each major program function.
7. Data Structure: Data structure is a representation of the logical relationship among individual elements of
data
8. Software Procedure
76 | P a g e
Compiled By: Er. Ganesh Ram Suwal
9. Information Hiding
77 | P a g e
Compiled By: Er. Ganesh Ram Suwal
• This is based on stepwise refinement. Stepwise refinement is a top down strategy where a program is
refined as a hierarchy of increasing levels of detail.
• We start with a high level description of what the program does. Then, in each step, we take one part of
our high level description and refine it, i.e., specify in somewhat greater detail what that particular does.
• The process should proceed from a highly conceptual model (abstractions) to lower level details.
• The refinement of each module is done until we reach the statement level of our programming language.
At that point, we can describe the structure of our program as a tree of refinement in top down design
structure.
• Some of the nodes of the tree will be modules of the program
• Others will be simply statements.
78 | P a g e
Compiled By: Er. Ganesh Ram Suwal
• Objects have their own internal data which define their state.
• Similar objects constitute a class.
• In other words, each object is a member of some class. Classes may inherit features from super class.
• Conceptually, objects communicate by message passing.
79 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Most researchers and engineers agree that a good software design implies clean decomposition of the
problem into modules, and the neat arrangement of these modules in a hierarchy. The primary characteristics
of neat module decomposition are high cohesion and low coupling. Cohesion is a measure of functional
strength of a module.
A measure of how well the parts of a component fit together, i.e. how functionally related the parts are
For example, strong cohesion exists when all parts of a component contribute different aspects of related
functions
Strong cohesion promotes understanding and reasoning, and thus provides dividends with respect to
maintenance and reuse via separation of concerns
Cohesion
1. Coincidental cohesion: A module is said to have coincidental cohesion, if it performs a set of tasks that
relate to each other very loosely, if at all. In this case, the module contains a random collection of
functions. It is likely that the functions have been put in the module out of pure coincidence without any
thought or design. For example, in a transaction processing system (TPS), the get-input, print-error, and
80 | P a g e
Compiled By: Er. Ganesh Ram Suwal
summarize-members functions are grouped into one module. The grouping does not have any relevance
to the structure of the problem.
2. Logical cohesion: A module is said to be logically cohesive, if all elements of the module perform similar
operations, e.g. error handling, data input, data output, etc. An example of logical cohesion is the case
where a set of print functions generating different output reports are arranged into a single module.
3. Temporal cohesion: When a module contains functions that are related by the fact that all the functions
must be executed in the same time span, the module is said to exhibit temporal cohesion. The set of
functions responsible for initialization, start-up, shutdown of some process, etc. exhibit temporal cohesion
4. Procedural cohesion: A module is said to possess procedural cohesion, if the set of functions of the module
are all part of a procedure (algorithm) in which certain sequence of steps have to be carried out for
achieving an objective, e.g. the algorithm for decoding a message.
5. Communicational cohesion: A module is said to have communicational cohesion, if all functions of the
module refer to or update the same data structure, e.g. the set of functions defined on an array or a stack.
6. Sequential cohesion: A module is said to possess sequential cohesion, if the elements of a module form
the parts of sequence, where the output from one element of the sequence is input to the next. For
example, in a TPS, the get-input, validate-input, sort-input functions are grouped into one module.
7. Functional cohesion: Functional cohesion is said to exist, if different elements of a module cooperate to
achieve a single function. For example, a module containing all the functions required to manage
employees’ pay-roll exhibits functional cohesion. Suppose a module exhibits functional cohesion and we
are asked to describe what the module does, then we would be able to describe it using a single sentence.
Coupling
• Coupling between two modules is a measure of the degree of interdependence or interaction between the
two modules. A module having high cohesion and low coupling is said to be functionally independent of
other modules. If two modules interchange large amounts of data, then they are highly interdependent.
The degree of coupling between two modules depends on their interface complexity.
• The interface complexity is basically determined by the number of types of parameters that are
interchanged while invoking the functions of the module.
81 | P a g e
Compiled By: Er. Ganesh Ram Suwal
• Even if there are no techniques to precisely and quantitatively estimate the coupling between two
modules, classification of the different types of coupling will help to quantitatively estimate the degree of
coupling between two modules. Five types of coupling can occur between any two modules.
1. Data coupling: Two modules are data coupled, if they communicate through a parameter. An example is
an elementary data item passed as a parameter between two modules, e.g. an integer, a float, a character,
etc. This data item should be problem related and not used for the control purpose.
82 | P a g e
Compiled By: Er. Ganesh Ram Suwal
2. Stamp coupling: Two modules are stamp coupled, if they communicate using a composite data item such
as a record in PASCAL or a structure in C.
3. Control coupling: Control coupling exists between two modules, if data from one module is used to direct
the order of instructions execution in another. An example of control coupling is a flag set in one module
and tested in another module.
4. Common coupling: Two modules are common coupled, if they share data through some global data items.
5. Content coupling: Content coupling exists between two modules, if they share code, e.g. a branch from
one module into another module.
83 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Functional Independent
• A module having high cohesion and low coupling is said to be functionally independent from other
modules.
• By the term functional independence, we mean that a cohesive module performs a single task or function.
• A functionally independent module has minimal interaction with other modules.
• Functional independence is a key to good design primarily due to the following reasons.
– Functional independence reduces error propagation. Therefore, error existing in one module doesn’t
directly affect other modules and also any error existing in other modules doesn't directly affect that
particular module.
– Reuse of the module is possible, because each module performs some well defined and precise function
and the interface of the module with other modules is simple and minimal. Therefore, any such module
can be easily taken out and reused in a different program.
– Complexity of the design is reduced, because different modules can be understood in isolation as modules
are more or less independent from each other.
84 | P a g e
Compiled By: Er. Ganesh Ram Suwal
CHAPTER 6
6.1 Software Testing
• Introduction
– After detailed design, the coding and integration will begin.
– The source code for each is written and tested.
– The modules are brought together (Integrated) to form the system and tested.
“Testing is the process of executing a program with the intent of finding errors.”
What is testing?
• Testing is not showing that there are no errors in the program.
• Testing cannot show that the program performs its intended goal correctly.
So, Testing is the process of executing the program in order to find errors. A successful test is one that finds an
error.
85 | P a g e
Compiled By: Er. Ganesh Ram Suwal
86 | P a g e
Compiled By: Er. Ganesh Ram Suwal
87 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Parts of programs where a lot of errors have already been found are a good place to look for more errors.
The goal is not to humiliate the programmer!
6.4 Test Case design
88 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Unit Testing
89 | P a g e
Compiled By: Er. Ganesh Ram Suwal
90 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Advantages Disadvantages
91 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Advantages Disadvantages
As the tester has knowledge of the source Due to the fact that a skilled tester is needed to
code, it becomes very easy to find out which perform white box testing, the costs are
type of data can help in testing the application increased.
effectively. Sometimes it is impossible to look into every
It helps in optimizing the code. nook and corner to find out hidden errors that
Extra lines of code can be removed which can may create problems as many paths will go
bring in hidden defects. untested.
Due to the tester's knowledge about the code, It is difficult to maintain white box testing as
maximum coverage is attained during test the use of specialized tools like code analyzers
scenario writing. and debugging tools are required.
Black Box Testing is a software testing White Box Testing is a software testing
method in which the internal structure/ method in which the internal structure/
Definition
design/ implementation of the item being design/ implementation of the item being
tested is NOT known to the tester tested is known to the tester.
Mainly applicable to higher levels of testing: Mainly applicable to lower levels of testing:
Levels Applicable
Acceptance Testing Unit Testing
To
System Testing Integration Testing
Programming
Not Required Required
Knowledge
Implementation
Not Required Required
Knowledge
92 | P a g e
Compiled By: Er. Ganesh Ram Suwal
• Verification is the process of determining whether the output of one phase of software development
conforms to that of its previous phase,
• Whereas validation is the process of determining whether a fully developed system conforms to its
requirements specification.
Thus while verification is concerned with phase containment of errors, the aim of validation is that the final
product be error free
V & V Goals
• Verification and validation should establish confidence that the software is fit for its purpose.
93 | P a g e
Compiled By: Er. Ganesh Ram Suwal
1 Are you building it right? Are you building the right thing?
Ensure that the software system meets all the Ensure that functionalities meet the intended
2
functionality. behavior.
Verification takes place first and includes the checking for Validation occurs after verification and mainly
3
documentation, code etc. involves the checking of the overall product.
Have static activities as it includes the reviews, Have dynamic activities as it includes
5 walkthroughs, and inspections to verify that software is executing the software against the
correct or not. requirements.
What they do
94 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Toward the end of a development process when the Just prior to launch, sometimes ending within weeks or
product is in a near fully-usable state. even days of final release.
Usually very long and see many iterations. It’s not Usually only a few weeks (sometimes up to a couple of
uncommon for alpha to last 3-5x the length of beta. months) with few major iterations.
Plenty of bugs, crashes, missing docs and features. Some bugs, fewer crashes, most docs, feature complete.
Most known critical issues are fixed, some features Much of the feedback collected is considered for and/or
may change or be added as a result of early implemented in future versions of the product. Only
feedback. important/critical changes are made.
You have a decent idea of how a product performs You have a good idea of what your customer thinks
95 | P a g e
Compiled By: Er. Ganesh Ram Suwal
and whether it meets the design criteria (and if it’s about the product and what s/he is likely to experience
“beta-ready”) when they purchase it.
96 | P a g e
Compiled By: Er. Ganesh Ram Suwal
CHAPTER 7
7.1 Software Measurement
Metrics for software quality
Software Quality Assurance
Software reliability
The ISO 9000 quality standards.
What is quality?
Quality, simplistically, means that a product should meet its specification.
Basic goal of software engineering is to produce quality software
s/w quality is a goal and important field of s/w engineering.
Addressed by several standardization bodies such as ISO, IEEE and ANSI
s/w quality is conformance to explicit stated functional and performance requirements, explicitly
documented development standards and implicit characteristic that are expected of all professionally
developed s/w
97 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Software Qualities
Correctness
Reliability
98 | P a g e
Compiled By: Er. Ganesh Ram Suwal
Robustness
Performance
User friendliness
Verifiability
Maintainability
Repairability
Safety
Evolvability
Reusability
Portability
Understandability
Interoperability
Productivity
Size
Timeliness
Visibility
ISO 9000
An international set of standards for quality management.
Applicable to a range of organisations from manufacturing to service industries.
ISO 9001 applicable to organisations which design, develop and maintain products.
ISO 9001 is a generic model of the quality process that must be instantiated for each organisation using the
standard.
99 | P a g e
Compiled By: Er. Ganesh Ram Suwal
http://ecomputernotes.com/software-engineering
100 | P a g e