Introduction to Software Engineering Basics
Introduction to Software Engineering Basics
2. Components of Software
4. Software Characteristics
Software is defined as a collection of computer programs, procedures, rules, and data.
Software Characteristics are classified into major components. Software engineering is
the process of designing, developing, testing, and maintaining software.
1. Functionality: The software meets the requirements and specifications that it was
designed for, and it behaves as expected when it is used in its intended environment.
2. Usability: The software is easy to use and understand, and it provides a positive user
experience.
3. Reliability: The software is free of defects and it performs consistently and accurately
under different conditions and scenarios.
4. Performance: The software runs efficiently and quickly, and it can handle large
amounts of data or traffic.
5. Security: The software is protected against unauthorized access and it keeps the data
and functions safe from malicious attacks.
6. Maintainability: The software is easy to change and update, and it is well-
documented, so that it can be understood and modified by other developers.
7. Reusability: The software can be reused in other projects or applications, and it is
designed in a way that promotes code reuse.
8. Scalability: The software can handle an increasing workload and it can be easily
extended to meet the changing requirements.
9. Testability: The software is designed in a way that makes it easy to test and validate,
and it has a comprehensive test coverage.
Software Crisis is a term used in computer science for the difficulty of writing useful and
efficient computer programs in the required time. The software crisis was due to using the
same workforce, same methods, and same tools even though rapidly increasing software
demand, the complexity of software, and software challenges. With the increase in
software complexity, many software problems arose because existing methods were
insufficient.
Suppose we use the same workforce, same methods, and same tools after the fast
increase in software demand, software complexity, and software challenges. In that case,
there arise some issues like software budget problems, software efficiency
problems, software quality problems, software management, and delivery problems, etc.
This condition is called a Software Crisis.
There is no single solution to the crisis. One possible solution to a software crisis
is Software Engineering because software engineering is a systematic, disciplined, and
quantifiable approach. For preventing software crises, there are some guidelines:
Reduction in software over budget.
The quality of the software must be high.
Less time is needed for a software project.
Experienced and skilled people working on the software project.
Software must be delivered.
Software must meet user requirements.
Software process (also knows as software methodology) is a set of related activities that
leads to the production of the software. These activities may involve the development of
the software from the scratch, or, modifying an existing system. Any software process
must include the following four activities:
1. Software specification (or requirements engineering): Define the main
functionalities of the software and the constrains around them.
2. Software design and implementation: The software is to be designed and
programmed.
3. Software verification and validation: The software must conforms to it’s
specification and meets the customer needs.
4. Software evolution (software maintenance): The software is being modified to
meet customer and market requirements changes.
In practice, they include sub-activities such as requirements validation, architectural
design, unit testing, …etc. There are also supporting activities such as configuration and
change management, quality assurance, project management, user experience.
Conventional Engineering
Aspect Software Engineering Process Process
7. Software Quality Attributes: Software Quality shows how good and reliable a
product is. To convey an associate degree example, think about functionally correct
software. It performs all functions as laid out in the SRS document. But, it has an
associate degree virtually unusable program. Even though it should be functionally
correct, we tend not to think about it to be a high-quality product.
Another example is also that of a product that will have everything that the users need but
has an associate degree virtually incomprehensible and not maintainable code. Therefore,
the normal construct of quality as “fitness of purpose” for code merchandise isn’t
satisfactory.
The modern read of high-quality associates with software many quality factors like the
following:
Waterfall approach was first SDLC Model to be used widely in Software Engineering to
ensure success of the project. In "The Waterfall" approach, the whole process of software
development is divided into separate phases. In this Waterfall model, typically, the outcome
of one phase acts as the input for the next phase sequentially.
The following illustration is a representation of the different phases of the Waterfall Model.
The sequential phases in Waterfall model are −
All these phases are cascaded to each other in which progress is seen as flowing steadily
downwards (like a waterfall) through the phases. The next phase is started only after the
defined set of goals are achieved for previous phase and it is signed off, so the name
"Waterfall Model". In this model, phases do not overlap.
Users help to shape the future. As a result, errors can be discovered during the first
stage of the software development process.
Prototyping is also considered a risk reduction function because it allows non-existent
performance to be seen, lowering the risk of failure.
Assists team members in effectively communicating.
Customer satisfaction exists, and he can feel the product from the start.
There will be no risk of software loss.
Quick user feedback aids in the development of better software solutions.
8.2.3 Disadvantages of Software Prototyping :
The spiral model, initially proposed by Boehm, is an evolutionary software process model
that couples the iterative feature of prototyping with the controlled and systematic aspects of
the linear sequential model. It implements the potential for rapid development of new
versions of the software. Using the spiral model, the software is developed in a series of
incremental releases. During the early iterations, the additional release may be a paper
model or prototype. During later iterations, more and more complete versions of the
engineered system are produced.
Risk Assessment and reduction: The next phase in the cycle is to calculate these various
alternatives based on the goals and constraints. The focus of evaluation in this stage is
located on the risk perception for the project.
Development and validation: The next phase is to develop strategies that resolve
uncertainties and risks. This process may include activities such as benchmarking,
simulation, and prototyping.
Planning: Finally, the next step is planned. The project is reviewed, and a choice made
whether to continue with a further period of the spiral. If it is determined to keep, plans are
drawn up for the next step of the project.
The development phase depends on the remaining risks. For example, if performance or
user-interface risks are treated more essential than the program development risks, the next
phase may be an evolutionary development that includes developing a more detailed
prototype for solving the risks.
The risk-driven feature of the spiral model allows it to accommodate any mixture of a
specification-oriented, prototype-oriented, simulation-oriented, or another type of approach.
An essential element of the model is that each period of the spiral is completed by a review
that includes all the products developed during that cycle, including plans for the next cycle.
The spiral model works for development as well as enhancement projects.
8.3.2 Advantages
8.3.3 Disadvantages
The Evolutionary development model divides the development cycle into smaller,
incremental waterfall models in which users can get access to the product at the end of
each cycle.
1. Feedback is provided by the users on the product for the planning stage of the next
cycle and the development team responds, often by changing the product, plan, or
process.
2. Therefore, the software product evolves with time.
3. All the models have the disadvantage that the duration of time from the start of the
project to the delivery time of a solution is very high.
4. The evolutionary model solves this problem with a different approach.
5. The evolutionary model suggests breaking down work into smaller chunks, prioritizing
them, and then delivering those chunks to the customer one by one.
6. The number of chunks is huge and is the number of deliveries made to the customer.
7. The main advantage is that the customer’s confidence increases as he constantly gets
quantifiable goods or services from the beginning of the project to verify and validate
his requirements.
8. The model allows for changing requirements as well as all work is broken down into
maintainable work chunks.
Evolutionary Model
1. It is used in large projects where you can easily find modules for incremental
implementation. Evolutionary model is commonly used when the customer wants to
start using the core features instead of waiting for the full software.
2. Evolutionary model is also used in object oriented software development because the
system can be easily portioned into units in terms of objects.
8.4.2 Necessary Conditions for Implementing this Model
1. Customer needs are clear and been explained in deep to the developer team.
2. There might be small changes required in separate parts but not a major change.
3. As it requires time, so there must be some time left for the market constraints.
4. Risk is high and continuous targets to achieve and report to customer repeatedly.
5. It is used when working on a technology is new and requires time to learn.
Software development uses a dynamic and adaptable method called the iterative
enhancement Model. The iterative enhancement model encourages a software product’s
ongoing evolution and improvement. This methodology is noticeable due to its
concentration on adaptability, flexibility and change responsiveness. It makes it easier
for a product to evolve because it gives developers the freedom to progressively enhance
the software, making sure that it complies with evolving specifications, user demands, and
market demands. This helps products evolve more easily.
Life-Cycle of Iterative Enhancement Model
The Iterative Enhancement Model creates an environment where development teams can
more effectively adjust to changing requirements by segmenting the software
development process into smaller, more manageable parts. Every iteration improves on
the one before it, adding new features and fixing problems found in earlier stages.
Members of the team, stakeholders and end users are encouraged to collaborate and
communicate continuously to make sure the software meets changing needs and
expectations. Until the software is finished being built, the iteration process is carried out,
which involves giving the user the increments.
Especially in larger projects, managing several iterations at once can add complexity.
Higher cost
Due to constant changes, there may be delays in documentation, making it more
difficult to maintain comprehensive documentation.
Continuous customer engagement may not be possible in all scenarios, which impacts
the effectiveness of the model.
8.5.3 Specific use cases where this model proves beneficial include
1. Mobile app developement: Updates and improvements are often needed for mobile
apps to stay current with new devices, operating system versions and user
preferences. By using an iterative process developers can release the beta versions of
their apps, get user feedback and then improve functionality of those iterations in
future release.
2. Web Application Development: The requirements for developing web applications
frequently change as a result of shifting user demand and advancements in
technology. The Iterative Enhancement Model makes it possible to developed features
incrementally and guaranteeing that the application can be modified to satisfy
changing user and market demands. In later iterations it also makes it easier to
incorporate new features based on input from users.
3. E-commerce Platforms: Developement in e-commerece field often involves constant
updates. Implementing an iterative approach enables the introduction of new
functionality.
UNIT 2
Software Requirement Specifications (SRS)
1. Requirement Engineering
The process to gather the software requirements from client, analyze and document them is
known as requirement engineering.
Feasibility Study
Requirement Gathering
Software Requirement Specification
Software Requirement Validation
Feasibility study
This feasibility study is focused towards goal of the organization. This study analyzes
whether the software product can be practically materialized in terms of implementation,
contribution of project to organization, cost constraints and as per values and objectives of
the organization. It explores technical aspects of the project and product such as usability,
maintainability, productivity and integration ability.
The output of this phase should be a feasibility study report that should contain adequate
comments and recommendations for management about whether or not the project should
be undertaken.
Requirement Gathering
If the feasibility report is positive towards undertaking the project, next phase starts with
gathering requirements from the user. Analysts and engineers communicate with the client
and end-users to know their ideas on what the software should provide and which features
they want the software to include.
SRS is a document created by system analyst after the requirements are collected from
various stakeholders.
SRS defines how the intended software will interact with hardware, external interfaces,
speed of operation, response time of system, portability of software across various
platforms, maintainability, speed of recovery after crashing, Security, Quality, Limitations
etc.
SRS should come up with following features:
Requirements gathering - The developers discuss with the client and end users
and know their expectations from the software.
Organizing Requirements - The developers prioritize and arrange the requirements
in order of importance, urgency and convenience.
Negotiation & discussion - If requirements are ambiguous or there are some
conflicts in requirements of various stakeholders, if they are, it is then negotiated and
discussed with stakeholders. Requirements may then be prioritized and reasonably
compromised.
The requirements come from various stakeholders. To remove the ambiguity and
conflicts, they are discussed for clarity and correctness. Unrealistic requirements are
compromised reasonably.
Documentation - All formal & informal, functional and non-functional requirements
are documented and made available for next phase processing.
Requirements Elicitation is the process to find out the requirements for an intended software
system by communicating with client, end users, system users and others who have a stake
in the software system development.
Interviews are strong medium to collect requirements. Organization may conduct several
types of interviews such as:
Organization may conduct surveys among various stakeholders by querying about their
expectation and requirements from the upcoming system.
Questionnaires
A document with pre-defined set of objective questions and respective options is handed
over to all stakeholders to answer, which are collected and compiled.
A shortcoming of this technique is, if an option for some issue is not mentioned in the
questionnaire, the issue might be left unattended.
Task analysis
Team of engineers and developers may analyze the operation for which the new system is
required. If the client already has some software to perform certain operation, it is studied
and requirements of proposed system are collected.
Domain Analysis
Every software falls into some domain category. The expert people in the domain can be a
great help to analyze general and specific requirements.
Brainstorming
An informal debate is held among various stakeholders and all their inputs are recorded for
further requirements analysis.
Prototyping
Prototyping is building user interface without adding detail functionality for user to interpret
the features of intended software product. It helps giving better idea of requirements. If there
is no software installed at client’s end for developer’s reference and the client is not aware
of its own requirements, the developer creates a prototype based on initially mentioned
requirements. The prototype is shown to the client and the feedback is noted. The client
feedback serves as an input for requirement gathering.
Observation
Team of experts visit the client’s organization or workplace. They observe the actual
working of the existing installed systems. They observe the workflow at client’s end and how
execution problems are dealt. The team itself draws some conclusions which aid to form
requirements expected from the software.
Clear
Correct
Consistent
Coherent
Comprehensible
Modifiable
Verifiable
Prioritized
Unambiguous
Traceable
Credible source
A Data Flow Diagram (DFD) is a traditional visual representation of the information flows
within a system. A neat and clear DFD can depict the right amount of the system
requirement graphically. It can be manual, automated, or a combination of both.
It shows how data enters and leaves the system, what changes the information, and where
data is stored.
The objective of a DFD is to show the scope and boundaries of a system as a whole. It may
be used as a communication tool between a system analyst and any person who plays a
part in the order that acts as a starting point for redesigning a system. The DFD is also
called as a data flow graph or bubble chart.
Standard symbols for DFDs are derived from the electric circuit diagram analysis and are
shown in fig:
Circle: A circle (bubble) shows a process that transforms data inputs into data outputs.
Data Flow: A curved line shows the flow of data into or out of a process or data store.
Data Store: A set of parallel lines shows a place for the collection of data items. A data
store indicates that the data is stored which can be used at a later stage or by the other
processes in a different order. The data store can have an element or group of elements.
Source or Sink: Source or Sink is an external entity and acts as a source of system inputs
or sink of system outputs.
The DFD may be used to perform a system or software at any level of abstraction. Infact,
DFDs may be partitioned into levels that represent increasing information flow and
functional detail. Levels in DFD are numbered 0, 1, 2 or beyond. Here, we will see primarily
three levels in the data flow diagram, which are: 0-level DFD, 1-level DFD, and 2-level DFD.
0-level DFDM
It is also known as fundamental system model, or context diagram represents the entire
software requirement as a single bubble with input and output data denoted by incoming
and outgoing arrows. Then the system is decomposed and described as a DFD with
multiple bubbles. Parts of the system represented by each of these bubbles are then
decomposed and documented as more and more detailed DFDs. This process may be
repeated at as many levels as necessary until the program at hand is well understood. It is
essential to preserve the number of inputs and outputs between levels, this concept is
called leveling by DeMacro. Thus, if bubble "A" has two inputs x 1 and x2 and one output y,
then the expanded DFD, that represents "A" should have exactly two external inputs and
one external output as shown in fig:
The Level-0 DFD, also called context diagram of the result management system is shown in
fig. As the bubbles are decomposed into less and less abstract bubbles, the corresponding
data flow may also be needed to be decomposed.
1-level DFD
2-level DFD goes one process deeper into parts of 1-level DFD. It can be used to project or
record the specific/necessary detail about the system's functioning .
5. Entity-Relationship Diagrams
Purpose of ERD
o The database analyst gains a better understanding of the data to be contained in the
database through the step of constructing the ERD.
o The ERD serves as a documentation tool.
o Finally, the ERD is used to connect the logical structure of the database to users. In
particular, the ERD effectively communicates the logic of the database to users.
Components of an ER Diagrams
1. Entity
An entity can be a real-world object, either animate or inanimate, that can be merely
identifiable. An entity is denoted as a rectangle in an ER diagram. For example, in a school
database, students, teachers, classes, and courses offered can be treated as entities. All
these entities have some attributes or properties that give them their identity.
Entity Set
An entity set is a collection of related types of entities. An entity set may include entities with
attribute sharing similar values. For example, a Student set may contain all the students of a
school; likewise, a Teacher set may include all the teachers of a school from all faculties.
Entity set need not be disjoint.
2. Attributes
Entities are denoted utilizing their properties, known as attributes. All attributes have values.
For example, a student entity may have name, class, and age as attributes.
There exists a domain or range of values that can be assigned to attributes. For example, a
student's name cannot be a numeric value. It has to be alphabetic. A student's age cannot
be negative, etc.
1. Key attribute
2. Composite attribute
3. Single-valued attribute
4. Multi-valued attribute
5. Derived attribute
1. Key attribute: Key is an attribute or collection of attributes that uniquely identifies an entity among the
entity set. For example, the roll_number of a student makes him identifiable among students.
There are mainly three types of keys:
1. Super key: A set of attributes that collectively identifies an entity in the entity set.
2. Candidate key: A minimal super key is known as a candidate key. An entity set may
have more than one candidate key.
3. Primary key: A primary key is one of the candidate keys chosen by the database
designer to uniquely identify the entity set.
4. Multi-valued Attribute: If an attribute can have more than one value, it is known as a
multi-valued attribute. Multi-valued attributes are depicted by the double ellipse. For
example, a person can have more than one phone number, email-address, etc.
5. Derived attribute: Derived attributes are the attribute that does not exist in the physical
database, but their values are derived from other attributes present in the database. For
example, age can be derived from date_of_birth. In the ER diagram, Derived attributes are
depicted by the dashed ellipse.
3. Relationships
1. Unary (degree1)
2. Binary (degree2)
3. Ternary (degree3)
2. Binary relationship: It is a relationship between the instances of two entity types. For
example, the Teacher teaches the subject.
Ternary relationship: It is a relationship amongst instances of three entity types. In fig, the
relationships "may have" provide the association of three entities, i.e., TEACHER,
STUDENT, and SUBJECT. All three entities are many-to-many participants. There may be
one or many participants in a ternary relationship.
In general, "n" entities can be related by the same relationship and is known as n-ary
relationship.
Cardinality
Cardinality describes the number of entities in one entity set, which can be
associated with the number of entities of other sets via relationship set.
Types of Cardinalities
1. One to One: One entity from entity set A can be contained with at most one entity
of entity set B and vice versa. Let us assume that each student has only one
student ID, and each student ID is assigned to only one person. So, the
relationship will be one to one
3. Many to One: More than one entity from entity set A can be associated with at most one
entity of entity set B, however an entity from entity set B can be associated with more than
one entity from entity set A. For example - many students can study in a single college, but
a student cannot study in many colleges at the same time.
6. Decision Table
A decision table is a good way to settle different combination inputs with their
corresponding outputs and is also called a cause-effect table.
1. The reason to call the cause-effect table is a related logical diagramming technique
called cause-effect graphing that is used to obtain the decision table.
2. The information represented in decision tables can also be represented as decision
trees or in a programming language using if-then-else and switch-case statements.
1. Easy conversion of business flow to test case: Any complex business flow can be
easily converted into test scenarios and test cases using this technique.
2. Works iteratively: Decision tables work iteratively which means the table created at
the first iteration is used as input tables for the next tables. The iteration is done only if
the initial table is not satisfactory.
3. Simple to understand: Simple to understand and everyone can use this method to
design the test scenarios & test cases.
4. Provides complete test case coverage: It provides complete coverage of test cases
which helps to reduce the rework on writing test scenarios & test cases.
5. Guarantees every combination is considered: These tables guarantee that we
consider every possible combination of condition values. This is known as its
completeness property.
The SRS document is reviewed by the testing person or a group of persons by using any
verification method (like peer reviews, walkthroughs, inspections, etc.). We may use
inspections due to their effectiveness and capability to produce good results. We may
conduct reviews twice or even more often. Every review will improve the quality of the
document but may consume resources and increase the cost of the software
development.
A checklist is a popular verification tool that consists of a list of critical information content
that a deliverable should contain. A checklist may also look for duplicate information,
missing information, unclear information, wrong information, etc. Checklists are used
during reviewing and may make reviews more structured and effective.
Purpose and Scope: The purpose and scope section of an SRS document should
provide a high-level overview of the software, its intended audience, and the problem it
solves. This section should also outline any constraints, assumptions, and
dependencies that may affect the software’s development.
Functional Requirements: Functional requirements describe what the software should
do. These requirements should be specific, measurable, and testable. This section
should include details about the software’s features, user interface, and data
processing.
Non-functional Requirements: Non-functional requirements describe how the
software should perform. These requirements should be measurable and testable. This
section should include details about the software’s performance, security, reliability,
and usability.
System Architecture: The system architecture section should describe the high-level
design of the software. This section should include details about the software’s
components, interfaces, and data flow.
Data Management: The data management section should describe how the software
will handle data. This section should include details about the software’s database, data
storage, and data backup and recovery processes.
User Documentation: The user documentation section should describe how users will
interact with the software. This section should include details about the software’s user
interface, user manuals, and help documents.
Testing Requirements
The testing requirements section should describe how the software will be tested. This
section should include details about the software’s test cases, test environment, and
test data.
Acceptance Criteria: The acceptance criteria section should describe how the
software will be accepted by the stakeholders. This section should include details about
the software’s acceptance tests, validation criteria, and sign-off procedures.
Project Timeline: The project timeline section should provide a timeline for the
software’s development. This section should include details about the software’s
milestones, deliverables, and deadlines.
Stakeholder List: The stakeholder list section should identify all the stakeholders
involved in the project. This section should include details about each stakeholder’s
role, responsibilities, and contact information.
1. Correctness
In the SRS document, every requirement stated in the document should correctly
represent an expectation from the proposed software.
All applicable safety and security requirements must be identified.
Also, all the inputs and outputs of each requirement are required and sufficient for the
specified processing.
2. Ambiguity
The SRS document may contain some ambiguity in the software requirements.
For example, If a requirement conveys more than one meaning of a thing, then it will be
a serious problem so, to avoid this ambiguity, every requirement must have a single
meaning only.
Hence, the software requirement statement should be short, correct, precise, and clear.
The SRS document checklist must focus on ambiguous words to avoid ambiguity.
3. Completeness
The SRS document should be complete in all aspects it must have all the important
functional requirements (like hardware faults, I/O errors, computational errors,
processing overload, buffer overflow, events failing to occur, etc.)
Non-functional requirements needed for the software and this completeness of the SRS
document must be checked thoroughly through a checklist.
4. Consistency
In the SRS document, the consistency of the document can be maintained if all the
stated requirements do not vary from the other stated requirements.
Every object is referred to with a unique name and is defined by one set of
characteristics that are not in conflict with one another.
5. Verifiability
In the SRS document, it is said to be verifiable, if and only if, every requirement stated
in the document is verifiable.
The non-verifiable requirements include statements like ‘good interfaces’, ‘excellent
response time’, ‘usually’, ‘well’, etc, which should not be used.
The requirements terminology like “shall”, “will”, “may”, etc. should be used. In the
document, we should only use measurable terms and must avoid all the indefinite
terms.
6. Traceability
The SRS document can be traceable if the source of every requirement is defined
correctly as it may help in future development.
Traceability may help to structure the document and should find a place in the design of
the checklist.
7. Feasibility
In the SRS document, some of the requirements may not be feasible to implement due
to technical reasons or lack of resources so, those such requirements should be
identified and accordingly removed from the SRS document.
A document checklist can also help us to find some other non-feasible requirements in
the software.
The Institute of Electrical and Electronics Engineers publishes several dozen software
engineering standards, including IEEE Std 830-1998, "IEEE Recommended Practice for
Software Requirements Specifications." Standard 830, last revised in 1998, has since been
replaced by Standard ISO/IEC/IEEE 29148:2011, with an update in 2018.
Editor's note: IEEE 29148 covers the processes and information it recommends for a
software requirements specification (SRS) document, as well as its format. Use the
standard to understand what makes for a good software requirement, as well as how to
apply these requirements throughout the software's lifecycle. While it can be adopted
independently, IEEE 29148-2018 also includes information on how to work with standard
15288, a common framework of process descriptions related to systems' lifecycles, and
12207, a common framework for software lifecycle processes.
Like many IEEE standards for software engineering, Standard 830 includes guidance and
recommended approaches for specifying software requirements. It's not a complete tutorial
on requirements development, but it does contain some useful information. The bulk of the
text is a detailed suggested template for organizing the different kinds of requirements
information for a software product -- an SRS.
The heart of the SRS consists of descriptions of both functional and nonfunctional
requirements. The IEEE standard provides several suggestions of how to organize
functional requirements: by mode, user class, object, feature, stimulus, functional hierarchy
or combinations of these criteria. There is no single organizational approach that's best; use
whatever makes sense for your project.
9. Software Quality Assurance (SQA) is simply a way to assure quality in the
software. It is the set of activities which ensure processes, procedures as well as
standards are suitable for the project and implemented correctly.
Software Quality Assurance is a process which works parallel to development of software. It
focuses on improving the process of development of software so that problems can be
prevented before they become a major issue. Software Quality Assurance is a kind of
Umbrella activity that is applied throughout the software process.
Software Quality Assurance has:
1. A quality management approach
2. Formal technical reviews
3. Multi testing strategy
4. Effective software engineering technology
5. Measurement and reporting mechanism
9.1 Major Software Quality Assurance Activities:
Static Testing
Verification Testing is known as Static Testing and it can be simply termed as checking
whether we are developing the right product or not and also whether our software is
fulfilling the customer’s requirement or not.
Validation
Validation is the process of checking whether the software product is up to the mark or in
other words product has high-level requirements. It is the process of checking the
validation of the product i.e. it checks what we are developing is the right product. it is a
validation of actual and expected products. Validation is simply known as Dynamic
Testing.
Dynamic Testing
Validation Testing is known as Dynamic Testing in which we examine whether we have
developed the product right or not and also about the business needs of the client. Here
are some of the activities that are involved in Validation.
1. Black Box Testing
2. White Box Testing
3. Unit Testing
4. Integration Testing
1. Developers View:
Validation and verification are two independent methods used together for
checking that a software product meets the requirements and that it fulfills its
intended [Link] checks that the product design satisfies the
purposeful usage and verification checks for errors in the software. The primary
concern for developers is in the design and engineering processes involved in
producing software. Quality can be measured by the degree of conformance to
predetermined requirements and standards, and deviations from these standards
can lead to poor quality and low reliability. While validation and verification are
used by the developers to improve the software, the two methods don’t represent
a quantifiable quality measurement.
The developer view of software quality and customer view of software quality are
both different things.
For example, a teacher may write a spreadsheet to track students' test scores. In
these end-user programming situations, the program is a means to an end that
could be used to accomplish a goal. In contradiction to end-user programming,
professional programming has the goal of producing software for others to use.
For example, the moment a novice Web developer moves from designing a web
page for himself to designing a Web page for others, the nature of this activity has
changed.
Users find software quality as a fit between their goals and software’s
functionality. The better the quality, the more likely the user will be satisfied with
the soft-ware. When the quality is bad, developers must meet user needs or face
a diminishing demand for their software. Therefore, the user understands quality
as fitness for purpose. Avoiding complexity and keeping software simple
considerably lessens the implementation risk of [Link] some instances,
users abandoned the implementation of a complex software because the software
developers were expecting the users to change their business and to go with the
way the software works.
3. Product View:
The product view describes quality as correlated to inherent characteristics of the
product. Product quality is defined as the set of characteristics and features of a
product that gives contribution to its ability to fulfill given requirements. Product
quality can be measured by the value-based view which sees the quality as
dependent on the amount a customer is willing to pay for it. According to the
users, a high-quality product is one that satisfies their expectations and
preferences while meeting their requirements. Satisfaction of end users of the
product represents craft to learn, use, upgrade the product and when asked to
participate in rating the product, a positive rating is given.
An organization determines to obtain ISO 9000 certification applies to ISO registrar office for
registration. The process consists of the following stages:
Key Process Areas (KPA’s): Each of these KPA’s defines the basic
requirements that should be met by a software process in order to satisfy
the KPA and achieve that level of maturity.
Conceptually, key process areas form the basis for management control of
the software project and establish a context in which technical methods are
applied, work products like models, documents, data, reports, etc. are
produced, milestones are established, quality is ensured and change is
properly managed .
The 5 levels of CMM are as follows:
Level-1: Initial –
No KPIs defined.
Processes followed are Ad Hoc and immature and are not well defined.
Unstable environment for software development.
No basis for predicting product quality, time for completion, etc.
Level-2: Repeatable –
Focuses on establishing basic project management policies.
Experience with earlier projects is used for managing new similar natured
projects.
Project Planning- It includes defining resources required, goals, constraints, etc.
for the project. It presents a detailed plan to be followed systematically for the
successful completion of good quality software.
Configuration Management- The focus is on maintaining the performance of the
software product, including all its components, for the entire lifecycle.
Requirements Management- It includes the management of customer reviews
and feedback which result in some changes in the requirement set. It also
consists of accommodation of those modified requirements.
Subcontract Management- It focuses on the effective management of qualified
software contractors i.e. it manages the parts of the software which are developed
by third parties.
Software Quality Assurance- It guarantees a good quality software product by
following certain rules and quality standard guidelines while developing.
Level-3: Defined –
At this level, documentation of the standard guidelines and procedures takes
place.
It is a well-defined integrated set of project-specific software engineering and
management processes.
Peer Reviews- In this method, defects are removed by using a number of review
methods like walkthroughs, inspections, buddy checks, etc.
Intergroup Coordination- It consists of planned interactions between different
development teams to ensure efficient and proper fulfillment of customer needs.
Organization Process Definition- Its key focus is on the development and
maintenance of the standard development processes.
Organization Process Focus- It includes activities and practices that should be
followed to improve the process capabilities of an organization.
Training Programs- It focuses on the enhancement of knowledge and skills of the
team members including the developers and ensuring an increase in work
efficiency.
Level-4: Managed –
At this stage, quantitative quality goals are set for the organization for software
products as well as software processes.
The measurements made help the organization to predict the product and
process quality within some limits defined quantitatively.
Software Quality Management- It includes the establishment of plans and
strategies to develop quantitative analysis and understanding of the product’s
quality.
Quantitative Management- It focuses on controlling the project performance in a
quantitative manner.
Level-5: Optimizing –
This is the highest level of process maturity in CMM and focuses on continuous
process improvement in the organization using quantitative feedback.
Use of new tools, techniques, and evaluation of software processes is done to
prevent recurrence of known defects.
Process Change Management- Its focus is on the continuous improvement of the
organization’s software processes to improve productivity, quality, and cycle time
for the software product.
Technology Change Management- It consists of the identification and use of new
technologies to improve product quality and decrease product development time.
Defect Prevention- It focuses on the identification of causes of defects and
prevents them from recurring in future projects by improving project-defined
processes.
Unit 3
Software Design
1. Software Design
Software design is a process to transform user requirements into some suitable form, which
helps the programmer in software coding and implementation.
For assessing user requirements, an SRS (Software Requirement Specification) document
is created whereas for coding and implementation, there is a need of more specific and
detailed requirements in software terms. The output of this process can directly be used into
implementation in programming languages.
Software design is the first step in SDLC (Software Design Life Cycle), which moves the
concentration from problem domain to solution domain. It tries to specify how to fulfill the
requirements mentioned in SRS.
1.1 Modularization
1. Module
It represents the process or task of the system. It is of three types:
2. Conditional Call
It represents that control module can select any of the sub module on the basis of some
condition.
3. Loop (Repetitive call of module)
It represents the repetitive execution of module by the sub module. A curved arrow
represents a loop in the module.
All the sub modules cover by the loop repeat execution of module .
4. Data Flow
It represents the flow of data between the modules. It is represented by a directed arrow
with an empty circle at the end.
5. Control Flow
It represents the flow of control between the modules. It is represented by a directed arrow
with a filled circle at the end.
7. Physical Storage
It is that where all the information are to be stored.
Example
Structure chart for an Email server
1.3 Pseudo Code
A Pseudocode is defined as a step-by-step description of an algorithm. Pseudocode does
not use any programming language in its representation instead it uses the simple English
language text as it is intended for human understanding rather than machine reading.
Pseudocode is the intermediate state between an idea and its
implementation(code) in a high-level language.
Example:
This program will print first N numbers of Fibonacci series.
Use standard programming structures such as if-else, for, while, and cases the way
we use them in programming. Indent the statements if-else, for, while loops as they are
indented in a program, it helps to comprehend the decision control and execution
mechanism. It also improves readability to a great extent.
Example:
IF “1”
print response
“I AM CASE 1”
IF “2”
print response
“I AM CASE 2”
Use appropriate naming conventions. The human tendency follows the approach of
following what we see. If a programmer goes through a pseudo code, his approach will
be the same as per that, so the naming must be simple and distinct.
Reserved commands or keywords must be represented in capital letters.
Example: if you are writing IF…ELSE statements then make sure IF and ELSE be in
capital letters.
Check whether all the sections of a pseudo code are complete, finite, and clear to
understand and comprehend. Also, explain everything that is going to happen in the
actual code.
Don’t write the pseudocode in a programming language. It is necessary that the
pseudocode is simple and easy to understand even for a layman or client, minimizing
the use of technical terms.
1.4 Flowchart
Flowchart is a diagrammatic representation of sequence of logical steps of a program.
Flowcharts use simple geometric shapes to depict processes and arrows to show
relationships and process/data flow.
Flowchart Symbols
Here is a chart for some of the common symbols used in drawing flowcharts.
Example
Cohesion
Cohesion is a measure that defines the degree of intra-dependability within elements of a
module. The greater the cohesion, the better is the program design.
There are seven types of cohesion, namely –
Co-incidental cohesion - It is unplanned and random cohesion, which might be
the result of breaking the program into smaller modules for the sake of
modularization. Because it is unplanned, it may serve confusion to the
programmers and is generally not-accepted.
Logical cohesion - When logically categorized elements are put together into a
module, it is called logical cohesion.
Temporal Cohesion - When elements of a module are organized such that
they are processed at a similar point in time, it is called temporal cohesion.
Procedural cohesion - When elements of a module are grouped together,
which are executed sequentially in order to perform a task, it is called
procedural cohesion.
Communicational cohesion - When elements of a module are grouped
together, which are executed sequentially and work on the same data
(information), it is called communicational cohesion.
Sequential cohesion - When elements of a module are grouped because the
output of one element serves as input to another and so on, it is called
sequential cohesion.
Functional cohesion - It is considered to be the highest degree of cohesion,
and it is highly expected. Elements of module in functional cohesion are
grouped because they all contribute to a single well-defined function. It can
also be reused.
Coupling
Coupling is a measure that defines the level of inter-dependability among modules of a
program. It tells at what level the modules interfere and interact with each other. The lower
the coupling, the better the program.
There are five levels of coupling, namely -
Content coupling - When a module can directly access or modify or refer to the
content of another module, it is called content level coupling.
Common coupling- When multiple modules have read and write access to
some global data, it is called common or global coupling.
Control coupling- Two modules are called control-coupled if one of them
decides the function of the other module or changes its flow of execution.
Stamp coupling- When multiple modules share a common data structure and
work on different parts of it, it is called stamp coupling.
Data coupling- Data coupling is when two modules interact with each other by
means of passing data (as parameter). If a module passes data structure as
parameter, then the receiving module should use all its components.
Design Verification
The output of software design process is design documentation, pseudo codes, detailed
logic diagrams, process diagrams, and detailed description of all functional or non-functional
requirements.
The next phase, which is the implementation of software, depends on all outputs mentioned
above.
It then becomes necessary to verify the output before proceeding to the next phase. The
earlier any mistake is detected, the better it is or it might not be detected until testing of the
product. If the outputs of the design phase are in formal notation form, then their associated
tools for verification should be used otherwise a thorough design review can be used for
verification and validation.
By structured verification approach, reviewers can detect defects that might be caused by
overlooking some conditions. A good design review is important for good software design,
accuracy and quality.
Differences between Coupling and Cohesion
Highly cohesive gives the best Whereas loosely coupling gives the
Relationship software. best software.
A good design is the one that has low coupling. Coupling is measured by the number of
relations between the modules. That is, the coupling increases as the number of calls
between modules increase or the amount of shared data is large. Thus, it can be said that a
design with high coupling will have more errors.
Cohesion is an ordinal type of measurement and is generally described as "high cohesion"
or "low cohesion."
3. Software design Strategies
Software design is a process to conceptualize the software requirements into software
implementation. Software design takes the user requirements as challenges and tries to find
optimum solution. While the software is being conceptualized, a plan is chalked out to find
the best possible design for implementing the intended solution.
There are multiple variants of software design. Let us study them briefly:
Structured Design
Structured design is a conceptualization of problem into several well-organized elements of
solution. It is basically concerned with the solution design. Benefit of structured design is, it
gives better understanding of how the problem is being solved. Structured design also
makes it simpler for designer to concentrate on the problem more accurately.
Structured design is mostly based on ‘divide and conquer’ strategy where a problem is
broken into several small problems and each small problem is individually s olved until the
whole problem is solved.
The small pieces of problem are solved by means of solution modules. Structured design
emphasis that these modules be well organized in order to achieve precise solution.
These modules are arranged in hierarchy. They communicate with each other. A good
structured design always follows some rules for communication among multiple modules,
namely -
Cohesion - grouping of all functionally related elements.
Coupling - communication between different modules.
A good structured design has high cohesion and low coupling arrangements.
Halstead metrics –
Halstead metrics are :
Halstead Program Length – The total number of operator occurrences and the
total number of operand occurrences.
N = N1 + N2
And estimated program length is, N^ = n1log2n1 + n2log2n2
The following alternate expressions have been published to estimate program
length:
o NJ = log2(n1!) + log2(n2!)
o NB = n1 * log2n2 + n2 * log2n1
o NC = n1 * sqrt(n1) + n2 * sqrt(n2)
o NS = (n * log2n) / 2
Halstead Vocabulary – The total number of unique operator and unique operand
occurrences.
n = n1 + n2
Program Volume – Proportional to program size, represents the size, in bits, of
space necessary for storing the program. This parameter is dependent on specific
algorithm implementation. The properties V, N, and the number of lines in the
code are shown to be linearly connected and equally valid for measuring relative
program size.
V = Size * (log2 vocabulary) = N * log2(n)
The unit of measurement of volume is the common unit for size “bits”. It is the
actual size of a program if a uniform binary encoding for the vocabulary is used.
And error = Volume / 3000
Potential Minimum Volume – The potential minimum volume V* is defined as the
volume of the most succinct program in which a problem can be coded.
V* = (2 + n2*) * log2(2 + n2*)
Here, n2* is the count of unique input and output parameters
Program Level – To rank the programming languages, the level of abstraction
provided by the programming language, Program Level (L) is considered. The
higher the level of a language, the less effort it takes to develop a program using
that language.
L = V* / V
The value of L ranges between zero and one, with L=1 representing a program
written at the highest possible level (i.e., with minimum size).
And estimated program level is L^ =2 * (n2) / (n1)(N2)
Program Difficulty – This parameter shows how difficult to handle the program is.
D = (n1 / 2) * (N2 / n2)
D=1/L
As the volume of the implementation of a program increases, the program level
decreases and the difficulty increases. Thus, programming practices such as
redundant usage of operands, or the failure to use higher-level control constructs
will tend to increase the volume as well as the difficulty.
Programming Effort – Measures the amount of mental activity needed to translate
the existing algorithm into implementation in the specified program language.
E = V / L = D * V = Difficulty * Volume
Example – List out the operators and operands and also calculate the values of software
science measures like
{
int i, j, save, im1;
/*This function sorts array x in ascending order */
If (n< 2) return 1;
for (i=2; i< =n; i++)
{
im1=i-1;
for (j=1; j< =im1; j++)
if (x[i] < x[j])
{
Save = x[i];
x[i] = x[j];
x[j] = save;
}
}
return 0;
}
Explanation –
int 4 sort 1
() 5 x 7
, 4 n 3
[] 7 i 8
if 2 j 7
< 2 save 3
; 11 im1 3
for 2 2 2
= 6 1 3
– 1 0 1
<= 2 – –
++ 2 – –
return 2 – –
{} 3 – –
Therefore,
N = 91
n = 24
V = 417.23 bits
N^ = 86.51
n2* = 3 (x:array holding integer
to be sorted. This is used both
as input and output)
V* = 11.6
L = 0.027
D = 37.03
L^ = 0.038
T = 610 seconds
It is simple to calculate.
It measures overall quality of the programs.
It predicts the rate of error.
It predicts maintenance effort.
It does not require the full analysis of programming structure.
It is useful in scheduling and reporting projects.
It can be used for any programming language.
Function Point (FP) is an element of software development which helps to approximate the
cost of development early in the process. It may measures functionality from the user's point
of view.
Counting Function Point (FP):
Step-1:
F = 14 * scale
Scale varies from 0 to 5 according to character of Complexity Adjustment Factor (CAF).
Below table shows scale:
0 - No Influence
1 - Incidental
2 - Moderate
3 - Average
4 - Significant
5 - Essential
Step-2: Calculate Complexity Adjustment Factor (CAF).
CAF = 0.65 + ( 0.01 * F )
Step-3: Calculate Unadjusted Function Point (UFP).
TABLE (Required)
EI 3 4 6
EO 4 5 7
EQ 3 4 6
ILF 7 10 15
EIF 5 7 10
Example:
Given the following values, compute function point when all complexity adjustment factor
(CAF) and weighting factors are average.
User Input = 50
User Output = 40
User Inquiries = 35
User Files = 6
External Interface = 4
Explanation:
Step-1: As complexity adjustment factor is average (given in question), hence,
scale = 3.
F = 14 * 3 = 42
Step-2:
CAF = 0.65 + ( 0.01 * 42 ) = 1.07
Step-3: As weighting factors are also average (given in question) hence we will
multiply each individual function point to corresponding values in TABLE.
UFP = (50*4) + (40*5) + (35*4) + (6*10) + (4*7) = 628
Step-4:
Function Point = 628 * 1.07 = 671.96
This is the required answer.
// Function Units
string funUnits[5] = {
"External Inputs",
"External Outputs",
"External Inquiries",
"Internal Logical Files",
"External Interface Files"
};
// Weight Rates
string wtRates[3] = { "Low", "Average", "High" };
// Weight Factors
int wtFactors[5][3] = {
{ 3, 4, 6 },
{ 4, 5, 7 },
{ 3, 4, 6 },
{ 7, 10, 15 },
{ 5, 7, 10 },
};
int UFP = 0;
// 14 factors
string aspects[14] = {
"reliable backup and recovery required ?",
"data communication required ?",
"are there distributed processing functions ?",
"is performance critical ?",
"will the system run in an existing heavily utilized operational environment ?",
"on line data entry required ?",
"does the on line data entry require the input transaction to be built over
multiple screens or operations ?",
"are the master files updated on line ?",
"is the inputs, outputs, files or inquiries complex ?",
"is the internal processing complex ?",
"is the code designed to be reusable ?",
"are the conversion and installation included in the design ?",
"is the system designed for multiple installations in different organizations ?",
"is the application designed to facilitate change and ease of use by the user ?"
};
/*
Rate Scale of Factors
Rate the following aspects on a scale of 0-5 :-
0 - No influence
1 - Incidental
2 - Moderate
3 - Average
4 - Significant
5 - Essential
*/
int sumF = 0;
sumF += rate;
}
// Calculate CFP
double CAF = 0.65 + 0.01 * sumF;
// Output Values
cout << "Function Point Analysis :-" << endl;
cout << "Unadjusted Function Points (UFP) : " << UFP << endl;
cout << "Complexity Adjustment Factor (CAF) : " << CAF << endl;
// driver function
int main()
{
int frates[5][3] = {
{ 0, 50, 0 },
{ 0, 40, 0 },
{ 0, 35, 0 },
{ 0, 6, 0 },
{ 0, 4, 0 }
};
int fac_rate = 3;
calfp(frates, fac_rate);
return 0;
}
Output:
Function Point Analysis :-
Unadjusted Function Points (UFP) : 628
Complexity Adjustment Factor (CAF) : 1.07
Function Points (FP) : 671.96
6. Cyclomatic Complexity
Difficulty Level : Easy
Last Updated : 27 Jul, 2022
Read
Discuss
M = E – N + 2P
where,
E = the number of edges in the control flow graph
N = the number of nodes in the control flow graph
P = the number of connected components
Steps that should be followed in calculating cyclomatic complexity and test cases design are:
A = 10
IF B > C THEN
A =B
ELSE
A=C
ENDIF
Print A
Print B
Print C
The cyclomatic complexity calculated for above code will be from control flow graph. The
graph shows seven shapes(nodes), seven lines(edges), hence cyclomatic complexity is 7-
7+2 = 2.
Use of Cyclomatic Complexity:
It is the measure of the program's control complexity and not the data complexity.
In this, nested conditional structures are harder to understand than non-nested
structures.
In case of simple comparisons and decision structures, it may give a misleading
figure.
Read
Discuss
A Control Flow Graph (CFG) is the graphical representation of control flow or computation
during the execution of programs or applications. Control flow graphs are mostly used in
static analysis as well as compiler applications, as they can accurately represent the flow
inside of a program unit. The control flow graph was originally developed by Frances E.
Allen.
Characteristics of Control Flow Graph:
1. Entry Block:
Entry block allows the control to enter into the control flow graph.
2. Exit Block:
Control flow leaves through the exit block.
Hence, the control flow graph is comprised of all the building blocks involved in a flow
diagram such as the start node, end node and flows between the nodes.
General Control Flow Graphs:
Control Flow Graph is represented differently for all statements and loops. Following images
describe it:
1. If-else:
2. while:
3. do-while:
4. for:
Example:
if A = 10 then
if B > C
A=B
else A = C
endif
endif
print A, B, C
Advantage of CFG:
There are many advantages of a control flow graph. It can easily encapsulate the
information per each basic block. It can easily locate inaccessible codes of a program and
syntactic structures such as loops are easy to find in a control flow graph.
Important Question
1) What is Software Engineering?
8) What is feasibility study? What are the contents we should contain in the feasibility report?
9) What are the purposes of Data Flow diagrams, Entity-Relationship diagrams? Give an example
diagram of each.
13) What are the metrics computed during error tracking activity?
The main goal of software testing is to find bugs as early as possible and fix bugs and make
sure that the software is bug-free. The goals of software testing may be classified into three
major categories as follows:
1. Immediate Goals
2. Long-term Goals
3. Post-Implementation Goals
1. Immediate Goals: These objectives are the direct outcomes of testing. These
objectives may be set at any time during the SDLC process. Some of these are covered in
detail below:
Bug Discovery: This is the immediate goal of software testing to find errors at
any stage of software development. The number of bugs is discovered in the
early stage of testing. The primary purpose of software testing is to detect flaws at
any step of the development process. The higher the number of issues detected
at an early stage, the higher the software testing success rate.
2. Long-Term Goals: These objectives have an impact on product quality in the long
run after one cycle of the SDLC is completed. Some of these are covered in detail below:
Quality: This goal enhances the quality of the software product. Because
software is also a product, the user’s priority is its quality. Superior quality is
ensured by thorough testing. Correctness, integrity, efficiency, and reliability are
all aspects that influence quality. To attain quality, you must achieve all of the
above-mentioned quality characteristics.
Customer Satisfaction: This goal verifies the customer’s satisfaction with a
developed software product. The primary purpose of software testing, from the
user’s standpoint, is customer satisfaction. Testing should be extensive and
thorough if we want the client and customer to be happy with the software
product.
Reliability: It is a matter of confidence that the software will not fail. In short,
reliability means gaining the confidence of the customers by providing them with a
quality product.
Risk Management: Risk is the probability of occurrence of uncertain events in
the organization and the potential loss that could result in negative
consequences. Risk management must be done to reduce the failure of the
product and to manage risk in different situations.
3. Post Implemented Goals : After the product is released, these objectives become
critical. Some of these are covered in detail below:
Reduce Maintenance Cost: Post-released errors are costlier to fix and difficult to
identify. Because effective software does not wear out, the maintenance cost of
any software product is not the same as the physical cost. The failure of a
software product due to faults is the only expense of maintenance. Because they
are difficult to discover, post-release mistakes always cost more to rectify. As a
result, if testing is done thoroughly and effectively, the risk of failure is lowered,
and maintenance costs are reduced as a result.
Principles of Testing:-
Types of Testing:-
1. Unit Testing
It focuses on the smallest unit of software design. In this, we test an individual unit or group
of interrelated units. It is often done by the programmer by using sample input and
observing its corresponding outputs.
Example:
c) Incorrect initialization
2. Integration Testing
The objective is to take unit-tested components and build a program structure that has
been dictated by design. Integration testing is testing in which a group of components is
combined to produce output. Integration testing is of four types: (i) Top-down (ii) Bottom-up
(iii) Sandwich (iv) Big-Bang
Example:
(a) Black Box testing:- It is used for validation. In this, we ignore internal working
mechanisms and focus on what is the output?
(b) White box testing:- It is used for verification. In this, we focus on internal mechanisms
i.e how the output is achieved?
3. Regression Testing
Every time a new module is added leads to changes in the program. This type of testing
makes sure that the whole component works properly even after adding components to the
complete program.
Example
In school, record suppose we have module staff, students and finance combining these
modules and checking if on integration of these modules works fine in regression testing
4. Smoke Testing
This test is done to make sure that the software under testing is ready or stable for further
testing It is called a smoke test as the testing of an initial pass is done to check if it did not
catch the fire or smoke in the initial switch on.
Example:
If the project has 2 modules so before going to the module make sure that module 1 works
properly.
5. Alpha Testing
This is a type of validation testing. It is a type of acceptance testing which is done before the
product is released to customers. It is typically done by QA people.
Example:
6. Beta Testing
The beta test is conducted at one or more customer sites by the end-user of the software.
This version is released for a limited number of users for testing in a real-time environment
Example:
This software is tested such that it works fine for the different operating systems. It is
covered under the black box testing technique. In this, we just focus on the required input
and output without focusing on internal working.
In this, we have security testing, recovery testing, stress testing, and performance testing
Example:
In this, we give unfavorable conditions to the system and check how they perform in those
conditions.
Example:
(a) Test cases that require maximum memory or other resources are executed
(b) Test cases that may cause thrashing in a virtual operating system
(c) Test cases that may cause excessive disk requirement
9. Performance Testing
This testing is a combination of various testing techniques that help to verify and validate
object-oriented software. This testing is done in the following manner:
Testing of Requirements,
Design and Analysis of Testing,
Testing of Code,
Integration testing,
System testing,
User Testing.
Acceptance testing is done by the customers to check whether the delivered products
perform the desired tasks or not, as stated in requirements.
The technique of testing without having any knowledge of the interior workings of the
application is called black-box testing. The tester is oblivious to the system architecture and
does not have access to the source code. Typically, while performing a black-box test, a
tester will interact with the system's user interface by providing inputs and examining
outputs without knowing how and where the inputs are worked upon.
The following table lists the advantages and disadvantages of black-box testing.
Advantages Disadvantages
Well suited and efficient for large code segments. Limited coverage, since only a
selected number of test scenarios
is actually performed.
Clearly separates the user's perspective from the Blind coverage, since the tester
developer's perspective through visibly defined cannot target specific code
roles. segments or error prone areas.
Large numbers of moderately skilled testers can The test cases are difficult to
test the application with no knowledge of design.
implementation, programming language, or
operating systems.
White-box testing is the detailed investigation of internal logic and structure of the code.
White-box testing is also called glass testing or open-box testing. In order to perform white-
box testing on an application, a tester needs to know the internal workings of the code. The
tester needs to have a look inside the source code and find out which unit/chunk of the code
is behaving inappropriately.
The following table lists the advantages and disadvantages of white-box testing.
Advantages Disadvantages
As the tester has knowledge of the source Due to the fact that a skilled tester is needed
code, it becomes very easy to find out to perform white-box testing, the costs are
which type of data can help in testing the increased.
application effectively.
Extra lines of code can be removed which It is difficult to maintain white-box testing, as it
can bring in hidden defects. requires specialized tools like code analyzers
and debugging tools.
Grey-Box Testing
Gray-box testing is a technique to test the application with having a limited knowledge of the
internal workings of an application. In software testing, the phrase the more you know, the
better carries a lot of weight while testing an application.
Mastering the domain of a system always gives the tester an edge over someone with
limited domain knowledge. Unlike black-box testing, where the tester only tests the
application's user interface; in grey-box testing, the tester has access to design documents
and the database. Having this knowledge, a tester can prepare better test data and test
scenarios while making a test plan.
The following table lists the advantages and disadvantages of Gray-box testing.
Advantages Disadvantages
Offers combined benefits of black-box and Since the access to source code is not
white-box testing wherever possible. available, the ability to go over the code
and test coverage is limited.
Grey box testers don't rely on the source The tests can be redundant if the software
code; instead they rely on interface definition designer has already run a test case.
and functional specifications.
Based on the limited information available, a Testing every possible input stream is
gray-box tester can design excellent test unrealistic because it would take an
scenarios especially around communication unreasonable amount of time; therefore,
protocols and data type handling. many program paths will go untested.
The following table lists the points that differentiate black-box testing, grey-box
testing, and white-box testing.
The internal workings of an The tester has limited Tester has full knowledge
application need not be knowledge of the internal of the internal workings of
known. workings of the application. the application.
Testing is based on external Testing is done on the basis of Internal workings are fully
expectations - Internal high-level database diagrams known and the tester can
behavior of the application is and data flow diagrams. design test data
unknown. accordingly.
It is exhaustive and the least Partly time-consuming and The most exhaustive and
time-consuming. exhaustive. time-consuming type of
testing.
Not suited for algorithm Not suited for algorithm Suited for algorithm
testing. testing. testing.
This can only be done by Data domains and internal Data domains and internal
trial-and-error method. boundaries can be tested, if boundaries can be better
known. tested.
Functional testing is a type of software testing in which the system is tested against the
functional requirements of the system. It is conducted to ensure that the requirements are
properly satisfied by the application. Functional testing verifies that each function of the
software application works in conformance with the requirement and specification. Boundary
Value Analysis (BVA) is one of the functional testing methods.
Boundary Value Analysis is based on testing the boundary values of valid and invalid
partitions. The behavior at the edge of the equivalence partition is more likely to be incorrect
than the behavior within the partition, so boundaries are an area where testing is likely to
yield defects.
It checks for the input values near the boundary that have a higher chance of error. Every
partition has its maximum and minimum values and these maximum and minimum values
are the boundary values of a partition.
Note:
Invalid
Invalid Valid
(max +
(min -1) (min, min + 1, nominal, max – 1, max)
1)
Valid Test cases: Valid test cases for the above can be any value entered greater
Invalid Test Cases: When any value less than 18 and greater than 56 is entered.
Single Fault Assumption: When more than one variable for the same application is
checked then one can use a single fault assumption. Holding all but one variable to the
extreme value and allowing the remaining variable to take the extreme value. For n variable
to be checked:
Maximum of 4n+1 test cases
Problem: Consider a Program for determining the Previous Data.
Input: Day, Month, Year with valid ranges as-
1 ≤ Month≤12
1 ≤ Day ≤31
1900 ≤ Year ≤ 2000
Design Boundary Value Test Cases.
Solution: Taking the year as a Single Fault Assumption i.e. year will be having values
varying from 1900 to 2000 and others will have nominal values.
Taking Day as Single Fault Assumption i.e. Day will be having values varying from 1
to 31 and others will have nominal values.
Taking Month as Single Fault Assumption i.e. Months will have values varying from 1
The idea and motivation behind BVA are that errors tend to occur near the extremes of the
variables. The defect on the boundary value can be the result of countless possibilities.
Typing of Languages: BVA is not suitable for free-form languages such as COBOL and
FORTRAN, These languages are known as weakly typed languages. This can be useful
and can cause bugs also.
PASCAL, ADA is the strongly typed language that requires all constants or variables
defined with an associated data type.
Equivalence Partitioning:
It is a type of black-box testing that can be applied to all levels of software testing. In this
technique, input data are divided into the equivalent partitions that can be used to derive
test cases-
In this input data are divided into different equivalence data classes.
It is applied when there is a range of input values.
Static Testing is a type of a Software Testing method which is performed to check the
defects in software without actually executing the code of the software application.
Whereas in Dynamic Testing the code is executed to detect the defects.
Static testing is performed in the early stage of development to avoid errors as it is easier to
find sources of failures and it can be fixed easily. The errors that can’t not be found using
Dynamic Testing, can be easily found by Static Testing.
Static Testing Techniques:
There are mainly two type techniques used in Static Testing:
1. Review:
In static testing review is a process or technique that is performed to find the potential
defects in the design of the software. It is a process to detect and remove errors and defects
in the different supporting documents like software requirements specifications. People
examine the documents and sort out errors, redundancies and ambiguities.
2. Static Analysis:
Static Analysis includes the evaluation of the code quality that is written by developers.
Different tools are used to do the analysis of the code and comparison of the same with the
standard.
It also helps in following identification of following defects:
(a) Unused variables
(b) Dead code
(c) Infinite loops
(d) Variable with undefined value
(e) Wrong syntax
Static Analysis is of three types:
Data Flow:
Data flow is related to stream processing.
Control Flow:
Control flow is basically how the statements or instructions are executed.
Cyclomatic Complexity:
Cyclomatic complexity is the measurement of the complexity of the program that
is basically related to the number of independent paths in the control flow graph of
the program.
The popular age of any software program is taken into consideration up to ten to
fifteen years. As software program renovation is open ended and might maintain
for decades making it very expensive.
Older software programs, which had been intended to paintings on sluggish
machines with much less reminiscence and garage ability cannot maintain
themselves tough in opposition to newly coming more advantageous software
program on contemporary-day hardware.
Changes are frequently left undocumented which can also additionally reason
greater conflicts in future.
As era advances, it turns into high priced to preserve vintage software program.
Often adjustments made can without problems harm the authentic shape of the
software program, making it difficult for any next adjustments.
There is lack of Code Comments.
1. Corrective maintenance:
Corrective maintenance of a software product may be essential either to rectify some
bugs observed while the system is in use, or to enhance the performance of the
system.
2. Adaptive maintenance:
This includes modifications and updations when the customers need the product to
run on new platforms, on new operating systems, or when they need the product to
interface with new hardware and software.
3. Perfective maintenance:
A software product needs maintenance to support the new features that the users
want or to change different types of functionalities of the system according to the
customer demands.
4. Preventive maintenance:
This type of maintenance includes modifications and updations to prevent future
problems of the software. It goals to attend problems, which are not significant at this
moment but may cause serious issues in future.
Reverse Engineering –
Non-Technical Factors
Technical Factors
Non-Technical Factors
1. Application Domain
If the application of the program is defined and well understood, the system
requirements may be definitive and maintenance due to changing needs minimized.
If the form is entirely new, it is likely that the initial conditions will be modified
frequently, as user gain experience with the system.
2. Staff Stability
3. Program Lifetime
Programs become obsolete when the program becomes obsolete, or their original
hardware is replaced, and conversion costs exceed rewriting costs.
4. Dependence on External Environment
5. Hardware Stability
Technical Factors
Module Independence
It should be possible to change one program unit of a system without affecting any other
unit.
Programming Language
Programs written in a high-level programming language are generally easier to understand
than programs written in a low-level language.
Programming Style
The method in which a program is written contributes to its understandability and hence, the
ease with which it can be modified.
Program Validation and Testing
Generally, more the time and effort are spent on design validation and program
testing, the fewer bugs in the program and, consequently, maintenance costs
resulting from bugs correction are lower.
Maintenance costs due to bug's correction are governed by the type of fault to be
repaired.
Coding errors are generally relatively cheap to correct, design errors are more
expensive as they may include the rewriting of one or more program units.
Bugs in the software requirements are usually the most expensive to correct because
of the drastic design which is generally involved.
Documentation
One of the essential costs of maintenance is keeping track of all system documents
and ensuring that these are kept consistent.
Effective configuration management can help control these costs.
Software Re-engineering
Software Re-engineering is a process of software development which is done to improve
the maintainability of a software system. Re-engineering is the examination and alteration of
a system to reconstitute it in a new form. This process encompasses a combination of sub-
processes like reverse engineering, forward engineering, reconstructing etc.
Re-engineering is the reorganizing and modifying existing software systems to make them
more maintainable.
Objectives of Re-engineering:
1. Inventory Analysis
2. Document Reconstruction
3. Reverse Engineering
4. Code Reconstruction
5. Data Reconstruction
6. Forward Engineering
Diagrammatic Representation:
Advantages of Re-engineering:
Reduced Risk: As the software is already existing, the risk is less as compared to
new software development. Development problems, staffing problems and
specification problems are the lots of problems which may arise in new software
development.
Reduced Cost: The cost of re-engineering is less than the costs of developing
new software.
Revelation of Business Rules: As a system is re-engineered , business rules that
are embedded in the system are rediscovered.
Better use of Existing Staff: Existing staff expertise can be maintained and
extended to accommodate new skills during re-engineering.
Disadvantages of Re-engineering:
Identify change
Monitor and control change
Ensure the proper implementation of change made to the item.
Auditing and reporting on the change made.
Importance of SCM
It is practical in controlling and managing the access to various SCIs e.g., by preventing the
two members of a team for checking out the same component for modification at the same
time.
It provides the tool to ensure that changes are being properly implemented.
It has the capability of describing and storing the various constituents of software.
SCM is used in keeping a system in a consistent state by automatically producing derived
version upon modification of the same component.
Version control systems are a category of software tools that helps in recording changes
made to files by keeping a track of modifications done in the code.
Why Version Control system is so Important?
As we know that a software product is developed in collaboration by a group of developers
they might be located at different locations and each one of them contributes to some
specific kind of functionality/features. So in order to contribute to the product, they made
modifications to the source code(either by adding or removing). A version control system is
a kind of software that helps the developer team to efficiently communicate and
manage(track) all the changes that have been made to the source code along with the
information like who made and what changes have been made. A separate branch is
created for every contributor who made the changes and the changes aren’t merged into
the original source code unless all are analyzed as soon as the changes are green signaled
they merged to the main source code. It not only keeps source code organized but also
improves productivity by making the development process smooth.
Basically Version control system keeps track on changes made on a particular software and
take a snapshot of every modification. Let’s suppose if a team of developer add some new
functionality in an application and the updated version is not working properly so as the
version control system keeps track of our work so with the help of version control system we
can omit the new changes and continue with the previous version.
Benefits of the version control system:
Local Version Control Systems: It is one of the simplest forms and has a database that
kept all the changes to files under revision control. RCS is one of the most common VCS
tools. It keeps patch sets (differences between files) in a special format on disk. By adding
up all the patches it can then re-create what any file looked like at any point in time.
Centralized Version Control Systems: Centralized version control systems contain just
one repository globally and every user need to commit for reflecting one’s changes in the
repository. It is possible for others to see your changes by updating.
Two things are required to make your changes visible to others which are:
You commit
They update
The benefit of CVCS (Centralized Version Control Systems) makes collaboration amongst
developers along with providing an insight to a certain extent on what everyone else is
doing on the project. It allows administrators to fine-grained control over who can do what.
It has some downsides as well which led to the development of DVS. The most obvious is
the single point of failure that the centralized repository represents if it goes down during
that period collaboration and saving versioned changes is not possible. What if the hard disk
of the central database becomes corrupted, and proper backups haven’t been kept? You
lose absolutely everything.
Distributed Version Control Systems: Distributed version control systems contain multiple
repositories. Each user has their own repository and working copy. Just committing your
changes will not give others access to your changes. This is because commit will reflect
those changes in your local repository and you need to push them in order to make them
visible on the central repository. Similarly, When you update, you do not get others’ changes
unless you have first pulled those changes into your repository.
To make your changes visible to others, 4 things are required:
You commit
You push
They pull
They update
The most popular distributed version control systems are Git, and Mercurial. They help us
overcome the problem of single point of failure.
CASE
CASE stands for Computer Aided Software Engineering. It means, development and
maintenance of software projects with help of various automated software tools.
CASE Tools
CASE tools are set of software application programs, which are used to automate SDLC
activities. CASE tools are used by software project managers, analysts and engineers to
develop software system.
There are number of CASE tools available to simplify various stages of Software
Development Life Cycle such as Analysis tools, Design tools, Project management tools,
Database Management tools, Documentation tools are to name a few.
Use of CASE tools accelerates the development of project to produce desired result and
helps to uncover flaws before moving ahead with next stage in software development.
Upper Case Tools - Upper CASE tools are used in planning, analysis and
design stages of SDLC.
Lower Case Tools - Lower CASE tools are used in implementation, testing
and maintenance.
Integrated Case Tools - Integrated CASE tools are helpful in all the stages of
SDLC, from Requirement gathering to Testing and documentation.
CASE tools can be grouped together if they have similar functionality, process
activities and capability of getting integrated with other tools.
Analysis Tools
These tools help to gather requirements, automatically check for any inconsistency,
inaccuracy in the diagrams, data redundancies or erroneous omissions. For example,
Accept 360, Accompa, CaseComplete for requirement analysis, Visible Analyst for total
analysis.
Design Tools
These tools help software designers to design the block structure of the software, which
may further be broken down in smaller modules using refinement techniques. These tools
provide detailing of each module and interconnections among modules. For example,
Animated Software Design
Configuration Management Tools
An instance of software is released under one version. Configuration Management tools
deal with –
Version and revision management
Baseline configuration management
Change control management
CASE tools help in this by automatic tracking, version management and release
management. For example, Fossil.
Software Cost Estimation
For any new software project, it is necessary to know how much it will cost to develop and
how much development time will it take. These estimates are needed before development is
initiated, but how is this done? Several estimation procedures have been developed and are
having the following attributes in common.
1. During the planning stage, one needs to choose how many engineers are required
for the project and to develop a schedule.
2. In monitoring the project's progress, one needs to access whether the project is
progressing according to the procedure and takes corrective action, if necessary.
Static, Single Variable Models: When a model makes use of single variables to calculate
desired values such as cost, time, efforts, etc. is said to be a single variable model. The
most common equation is:
C=aLb
Where C = Costs
L= size
a and b are constants
The Software Engineering Laboratory established a model called SEL model, for estimating
its software production. This model is an example of the static, single variable model.
E=1.4L0.93
DOC=30.4L0.90
D=4.6L0.26
Where E= Efforts (Person Per Month)
DOC=Documentation (Number of Pages)
D = Duration (D, in months)
L = Number of Lines per code
Static, Multivariable Models: These models are based on method (1), they depend on
several variables describing various aspects of the software development environment. In
some models, several variables are needed to describe the software development process,
and the selected equation combines these variables to give the estimate of time & cost.
These models are called multivariable models.
WALSTON and FELIX develop the models at IBM provide the f ollowing equation gives a
relationship between lines of source code and effort:
E=5.2L0.91
D=4.1L0.36
The productivity index uses 29 variables which are found to be highly correlated productivity
as follows:
Where W i is the weight factor for the ith variable and Xi ={-1,0,+1} the estimator gives Xi one
of the values -1, 0 or +1 depending on the variable decreases, has no effect or increases
productivity.
Example: Compare the Walston-Felix Model with the SEL model on a software development
expected to involve 8 person-years of effort.
Solution:
The amount of manpower involved = 8PY=96 persons-months
(a)Number of lines of source code can be obtained by reversing equation to give:
Then
L (SEL) = (96/1.4)1⁄0.93=94264 LOC
L (SEL) = (96/5.2)1⁄0.91=24632 LOC
(b)Duration in months can be calculated by means of equation
D (SEL) = 4.6 (L) 0.26
= 4.6 (94.264)0.26 = 15 months
D (W-F) = 4.1 L0.36
= 4.1 (24.632)0.36 = 13 months
(c) Productivity is the lines of code produced per persons/month (year)
(d)Average manning is the average number of persons required per month in the project
Different models of Cocomo have been proposed to predict the cost estimation at
different levels, based on the amount of accuracy and correctness required. All of
these models can be applied to a variety of projects, whose characteristics
determine the value of the constant to be used in subsequent calculations. These
characteristics pertaining to different system types are mentioned below. Boehm’s
definition of organic, semidetached, and embedded systems:
4. Basic Model –
1. The above formula is used for the cost estimation of for the basic COCOMO model,
and also is used in the subsequent models. The constant values a,b,c and d for
the Basic Model for the different categories of system:
Software Projects a b c d
CPP
Python3
// C++ program to implement basic COCOMO
#include <bits/stdc++.h>
// Function
// For rounding off float to int
int fround(float x)
{
int a;
x = x + 0.5;
a = x;
return (a);
}
int model;
// Calculate Effort
effort = table[model][0] * pow(size, table[model][1]);
// Calculate Time
time = table[model][2] * pow(effort, table[model][3]);
cout << "\nDevelopment Time = " << time << " Months";
cout << "\nAverage Staff Required = " << fround(staff)
<< " Persons";
}
int main()
{
float table[3][4] = { 2.4, 1.05, 2.5, 0.38, 3.0, 1.12,
2.5, 0.35, 3.6, 1.20, 2.5, 0.32 };
char mode[][15]
= { "Organic", "Semi-Detached", "Embedded" };
int size = 4;
return 0;
}
Output:
The mode is Organic
Effort = 10.289 Person-Month
Development Time = 6.06237 Months
Average Staff Required = 2 Persons
1. Intermediate Model – The basic Cocomo model assumes that the effort is only a
function of the number of lines of code and some constants evaluated according
to the different software systems. However, in reality, no system’s effort and
schedule can be solely calculated on the basis of Lines of Code. For that, various
other factors such as reliability, experience, Capability. These factors are known
as Cost Drivers and the Intermediate Model utilizes 15 such drivers for cost
estimation. Classification of Cost Drivers and their attributes: (i) Product attributes
–
1. Required software reliability extent
2. Size of the application database
3. The complexity of the product
4. Run-time performance constraints
5. Memory constraints
6. The volatility of the virtual machine environment
7. Required turnabout time
8. Analyst capability
9. Software engineering capability
10. Applications experience
11. Virtual machine experience
12. Programming language experience
13. Use of software tools
14. Application of software engineering methods
15. Required development schedule
2. Detailed Model – Detailed COCOMO incorporates all characteristics of the
intermediate version with an assessment of the cost driver’s impact on each step
of the software engineering process. The detailed model uses different effort
multipliers for each cost driver attribute. In detailed COCOMO, the whole
software is divided into different modules and then we apply COCOMO in
different modules to estimate effort and then sum the effort. The Six phases of
detailed COCOMO are:
1. Planning and requirements
2. System design
3. Detailed design
4. Module code and test
5. Integration and test
6. Cost Constructive model
Where, K is the total effort expended (in PM) in the product development
L is the product size in KLOC
t corresponds to the time of system and integration testing
d
C Is the state of technology constant and reflects constraints that impede the progress of
k
the program
Now by using the above expression, it is obtained that,
Risk Management:
A risk is a probable problem- it might happen or it might not. There are main two
characteristics of risk
Uncertainty- the risk may or may not happen that means there are no 100% risks.
loss – If the risk occurs in reality , undesirable result or losses will occur.
Risk management is a sequence of steps that help a software team to understand , analyze
and manage uncertainty. Risk management consists of
Risk Identification
Risk analysis
Risk Planning
Risk Monitoring
A computer code project may be laid low with an outsized sort of risk. so as to be ready to
consistently establish the necessary risks which could have an effect on a computer code
project, it’s necessary to reason risks into completely different categories. The project
manager will then examine the risks from every category square measure relevant to the
project.
There square measure 3 main classes of risks that may have an effect on a computer code
project:
1. Project Risks:
Project risks concern various sorts of monetary funds, schedules, personnel,
resource, and customer-related issues. A vital project risk is schedule slippage. Since
computer code is intangible, it’s terribly tough to observe and manage a computer
code project. it’s terribly tough to manage one thing that can not be seen. For any
producing project, like producing cars, the project manager will see the merchandise
taking form.
For example, see that the engine is fitted, at the moment the area of the door unit
fitted, the automotive is obtaining painted, etc. so he will simply assess the progress
of the work and manage it. The physical property of the merchandise being
developed is a vital reason why several computer codes come to suffer from the
danger of schedule slippage.
2. Technical Risks:
Technical risks concern potential style, implementation, interfacing, testing,
and maintenance issues. Technical risks conjointly embody ambiguous
specifications, incomplete specification, dynamic specification, technical
uncertainty, and technical degeneration. Most technical risks occur thanks to
the event team’s lean information concerning the project.
3. Business Risks:
This type of risk embodies the risks of building a superb product that
nobody needs, losing monetary funds or personal commitments, etc.
There are some steps that need to be followed in order to reduce risk. These steps
are as follows:
1. Risk Identification:
For example,
TABLE (Required)
Probability of
Risk Impact of Risk
Problem occurrence of Priority
No problem exposure
problem
Issue of incorrect
R1 2 2 4 10
password
Testing reveals a
R2 1 9 9 7
lot of defects
Design is not
R3 2 7 14 5
robust
The purpose of this technique is to altogether eliminate the occurrence of risks. so the
method to avoid risks is to reduce the scope of projects by removing non-essential
requirements.
4. Risk Monitoring:
In this technique, the risk is monitored continuously by reevaluating the risks, the
impact of risk, and the probability of occurrence of the risk.
This ensures that:
Risk has been reduced
New risks are discovered
Impact and magnitude of risk are measured
Risk Analysis
Risk analysis in project management is a sequence of processes to identify the factors that
may affect a project’s success. These processes include risk identification, analysis of risks,
risk management and control, etc. Proper risk analysis helps to control possible future
events that may harm the overall project. It is more of a pro-active than a reactive process.
How to Manage Risk?
Risk Management in Software Engineering primarily involves following activities:
Risk Identification
It is the procedure of determining which risk may affect the project most. This process
involves documentation of existing risks.
The input for identifying risk will be
Risk management plan
Project scope statement
Cost management plan
Schedule management plan
Human resource management plan
Scope baseline
Activity cost estimates
Activity duration estimates
Stakeholder register
Project documents
Procurement documents
Communication management plan
Enterprise environmental factor
Organizational process assets
Perform qualitative risk analysis
Perform quantitative risk analysis
Plan risk responses
Monitor and control risks
MCA
(SEM III) THEORY EXAMINATION 2022-23
SOFTWARE ENGINEERING
Time: 3 Hours Total Marks: 100
Note: Attempt all Sections. If you require any missing data, then choose
suitably.
SECTION A
SECTION B
SECTION C
a
[
i
]
a
[
j
]
;
a
[
j
]
t
;
}
}
}
}
C
a
l
c
u
l
a
t
e
t
h
e
f
o
r
m
7. Attempt any one part of the following: 10 x 1 = 10
(a) Categorize the use of case tools in software engineering with their
advantages and disadvantages.
(b) What are the benefits of Software Configuration Management (SCM)?
Elaborate the activities for SCM performed during SDLC?