Unit 3 SE
Unit 3 SE
INTRODUCTION:
Some of the terminologies that are often encountered while studying Object-
Oriented Concepts include:
1. Attributes: a collection of data values that describe a class.
2. Class: encapsulates the data and procedural abstractions required to describe
the content and behavior of some real-world entity. In other words, A class is a
generalized description that describes the collection of similar objects.
3. Objects: instances of a specific class. Objects inherit a class’s attributes and
operations.
4. Operations: also called methods and services, provide a representation of one
of the behaviors of the class.
5. Subclass: specialization of the super class. A subclass can inherit both
attributes and operations from a super class.
6. Superclass: also called a base class, is a generalization of a set of classes
that are related to it.
Advantages of OOAD:
Disadvantages of OOAD:
Class is a detailed description, the definition, and the template of what an object
will be. But it is not the object itself. Also, what we call, a class is the building
block that leads to Object-Oriented Programming. It is a user-defined data type,
that holds its own data members and member functions, which can be accessed
and used by creating an instance of that class. It is the blueprint of any object.
Once we have written a class and defined it, we can use it to create as many
objects based on that class as we want. In Java, the class contains fields,
constructors, and methods. For example, consider the Class of Accounts. There
may be many accounts with different names and types, but all of them will share
some common properties, as all of them will have some common
attributes like balance, account holder name, etc. So here, the Account is
the class.
Object is an instance of a class. All data members and member functions of the
class can be accessed with the help of objects. When a class is defined, no
memory is allocated, but memory is allocated when it is instantiated (i.e. an object
is created). For Example, considering the objects for the class Account are SBI
Account, ICICI account, etc.
Class Object
The class has to be declared first and only An object is created many times as per
once. requirement.
Class does not contain any values which Each object has its own values, which are
can be associated with the field. associated with it.
public:
void put(){
cout<<“Function Called”<<endl;
int main(){
s1.put();
A design is then made on which changes to implement in the next version of the
system. The process of change implementation is an iteration of the development
process where the revisions to the system are designed, implemented and
tested.
a) Change in requirement with time: With the passes of time, the organization’s
needs and modus Operandi of working could substantially be changed so in this
frequently changing time the tools(software) that they are using need to change
for maximizing the performance.
b) Environment change: As the working environment changes the things(tools)
that enable us to work in that environment also changes proportionally same
happens in the software world as the working environment changes then, the
organizations need reintroduction of old software with updated features and
functionality to adapt the new environment.
c) Errors and bugs: As the age of the deployed software within an organization
increases their preciseness or impeccability decrease and the efficiency to bear
the increasing complexity workload also continually degrades. So, in that case, it
becomes necessary to avoid use of obsolete and aged software. All such
obsolete Softwares need to undergo the evolution process in order to become
robust as per the workload complexity of the current environment.
d) Security risks: Using outdated software within an organization may lead you
to at the verge of various software-based cyberattacks and could expose your
confidential data illegally associated with the software that is in use. So, it
becomes necessary to avoid such security breaches through regular assessment
of the security patches/modules are used within the software. If the software isn’t
robust enough to bear the current occurring Cyber attacks so it must be changed
(updated).
e) For having new functionality and features: In order to increase the
performance and fast data processing and other functionalities, an organization
need to continuously evolute the software throughout its life cycle so that
stakeholders & clients of the product could work efficiently.
User interface is the front-end application view to which user interacts in order to
use the software. The software becomes more popular if its user interface is:
Attractive
Simple to use
Responsive in short time
Clear to understand
Consistent on all interface screens
There are two types of User Interface:
1. Command Line Interface: Command Line Interface provides a command
prompt, where the user types the command and feeds to the system. The user
needs to remember the syntax of the command and its use.
2. Graphical User Interface: Graphical User Interface provides the simple
interactive interface to interact with the system. GUI can be a combination of
both hardware and software. Using GUI, user interprets the software
The analysis and design process of a user interface is iterative and can be
represented by a spiral model. The analysis and design process of user interface
consists of four framework activities.
Golden Rules:
The following are the golden rules stated by Theo Mandel that must be followed
during the design of the interface.
There are several key principles that software engineers should follow
when designing user interfaces:
1. User-centered design: User interface design should be focused on the needs
and preferences of the user. This involves understanding the user’s goals,
tasks, and context of use, and designing interfaces that meet their needs and
expectations.
2. Consistency: Consistency is important in user interface design, as it helps
users to understand and learn how to use an application. Consistent design
elements such as icons, color schemes, and navigation menus should be used
throughout the application.
3. Simplicity: User interfaces should be designed to be simple and easy to use,
with clear and concise language and intuitive navigation. Users should be able
to accomplish their tasks without being overwhelmed by unnecessary
complexity.
4. Feedback: Feedback is important in user interface design, as it helps users to
understand the results of their actions and confirms that they are making
progress towards their goals. Feedback can take the form of visual cues,
messages, or sounds.
5. Accessibility: User interfaces should be designed to be accessible to all users,
regardless of their abilities. This involves considering factors such as color
contrast, font size, and assistive technologies such as screen readers.
6. Flexibility: User interfaces should be designed to be flexible and customizable,
allowing users to tailor the interface to their own preferences and needs.
1. Black box testing – Tests the functionality of the software without looking at
the internal code structure.
2. White box testing – Tests the internal code structure and logic of the
software.
3. Unit testing – Tests individual units or components of the software to ensure
they are functioning as intended.
4. Integration testing – Tests the integration of different components of the
software to ensure they work together as a system.
5. Functional testing – Tests the functional requirements of the software to
ensure they are met.
6. System testing – Tests the complete software system to ensure it meets the
specified requirements.
7. Acceptance testing – Tests the software to ensure it meets the customer’s
or end-user’s expectations.
8. Regression testing – Tests the software after changes or modifications have
been made to ensure the changes have not introduced new defects.
9. Performance testing – Tests the software to determine its performance
characteristics such as speed, scalability, and stability.
10. Security testing – Tests the software to identify vulnerabilities and ensure
it meets security requirements.
Software Testing is a type of investigation to find out if there is any default or
error present in the software so that the errors can be reduced or removed to
increase the quality of the software and to check whether it fulfills the specifies
requirements or not.
According to Glen Myers, software testing has the following objectives:
The process of investigating and checking a program to find whether there is
an error or not and does it fulfill the requirements or not is called testing.
When the number of errors found during the testing is high, it indicates that
the testing was good and is a sign of good test case.
Finding an unknown error that wasn’t discovered yet is a sign of a successful
and a good test case.
The main objective of software testing is to design the tests in such a way that it
systematically finds different types of errors without taking much time and effort
so that less time is required for the development of the software. The overall
strategy for testing software includes:
1.
Before testing starts, it’s necessary to identify and specify the
requirements of the product in a quantifiable manner. Different
characteristics quality of the software is there such as maintainability that
means the ability to update and modify, the probability that means to find and
estimate any risk, and usability that means how it can easily be used by the
customers or end-users. All these characteristic qualities should be specified
in a particular order to obtain clear test results without any error.
2. Specifying the objectives of testing in a clear and detailed
manner. Several objectives of testing are there such as effectiveness that
means how effectively the software can achieve the target, any failure that
means inability to fulfill the requirements and perform functions, and the cost
of defects or errors that mean the cost required to fix the error. All these
objectives should be clearly mentioned in the test plan.
3. For the software, identifying the user’s category and developing a profile
for each user. Use cases describe the interactions and communication
among different classes of users and the system to achieve the target. So as
to identify the actual requirement of the users and then testing the actual use
of the product.
4. Developing a test plan to give value and focus on rapid-cycle
testing. Rapid Cycle Testing is a type of test that improves quality by
identifying and measuring the any changes that need to be required for
improving the process of software. Therefore, a test plan is an important and
effective document that helps the tester to perform rapid cycle testing.
5. Robust software is developed that is designed to test itself. The software
should be capable of detecting or identifying different classes of errors.
Moreover, software design should allow automated and regression testing
which tests the software to find out if there is any adverse or side effect on the
features of software due to any change in code or program.
6. Before testing, using effective formal reviews as a filter. Formal technical
reviews is technique to identify the errors that are not discovered yet. The
effective technical reviews conducted before testing reduces a significant
amount of testing efforts and time duration required for testing software so that
the overall development time of software is reduced.
7. Conduct formal technical reviews to evaluate the nature, quality or
ability of the test strategy and test cases. The formal technical review helps
in detecting any unfilled gap in the testing approach. Hence, it is necessary to
evaluate the ability and quality of the test strategy and test cases by technical
reviewers to improve the quality of software.
8. For the testing process, developing a approach for the continuous
development. As a part of a statistical process control approach, a test
strategy that is already measured should be used for software testing to
measure and control the quality during the development of software.
Advantages or Disadvantages:
1. Improves software quality and reliability – Testing helps to identify and fix
defects early in the development process, reducing the risk of failure or
unexpected behavior in the final product.
2. Enhances user experience – Testing helps to identify usability issues and
improve the overall user experience.
3. Increases confidence – By testing the software, developers and stakeholders
can have confidence that the software meets the requirements and works as
intended.
4. Facilitates maintenance – By identifying and fixing defects early, testing
makes it easier to maintain and update the software.
5. Reduces costs – Finding and fixing defects early in the development process
is less expensive than fixing them later in the life cycle.
Black box testing and white box testing are two different approaches to
software testing, and their differences are as follows:
Black box testing is a testing technique in which the internal workings of the
software are not known to the tester. The tester only focuses on the input and
output of the software. Whereas, White box testing is a testing technique in which
the tester has knowledge of the internal workings of the software, and can test
individual code snippets, algorithms and methods.
Testing methods: Black box testing uses methods like equivalence partitioning,
boundary value analysis, and error guessing to create test cases. Whereas, white
box testing uses methods like control flow testing, data flow testing and statement
coverage.
Scope: Black box testing is generally used for testing the software at the
functional level. White box testing is used for testing the software at the unit level,
integration level and system level.
Advantages and disadvantages:
Black box testing is easy to use, requires no programming knowledge and is
effective in detecting functional issues. However, it may miss some important
internal defects that are not related to functionality. White box testing is effective
in detecting internal defects, and ensures that the code is efficient and
maintainable. However, it requires programming knowledge and can be time-
consuming.
In conclusion, both black box testing and white box testing are important for
software testing, and the choice of approach depends on the testing objectives,
the testing stage, and the available resources.
Differences between Black Box Testing vs White Box Testing:
Implementation of code is not needed for Code implementation is necessary for white
black box testing. box testing.
No knowledge of implementation is
Knowledge of implementation is required.
needed.
This testing can be initiated based on the This type of testing of software is started
requirement specifications document. after a detail design document.
It is the behavior testing of the software. It is the logic testing of the software.
Black Box Testing White Box Testing
Can be done by trial and error ways and Data domains along with inner or internal
methods. boundaries can be better tested.
System Testing
System Testing is a type of software testing that is performed on a complete integrated
system to evaluate the compliance of the system with the corresponding requirements. In
system testing, integration testing passed components are taken as input. The goal of
integration testing is to detect any irregularity between the units that are integrated
together. System testing detects defects within both the integrated units and the whole
system. The result of system testing is the observed behavior of a component or a system
when it is tested. System Testing is carried out on the whole system in the context of
either system requirement specifications or functional requirement specifications or in
the context of both. System testing tests the design and behavior of the system and also
the expectations of the customer. It is performed to test the system beyond the bounds
mentioned in the software requirements specification (SRS). System Testing is basically
performed by a testing team that is independent of the development team that helps to
test the quality of the system impartial. It has both functional and non-functional
testing. System Testing is a black-box testing. System Testing is performed after the
integration testing and before the acceptance testing.
Disadvantages of Debugging:
1. Code Quality
2. Reliability
3. Performance
4. Usability
5. Correctness
6. Maintainability
7. Integrity
8. Security
1. Code Quality – Code quality metrics measure the quality of code used for software
project development. Maintaining the software code quality by writing Bug-free and
semantically correct code is very important for good software project development.
In code quality, both Quantitative metrics like the number of lines, complexity,
functions, rate of bugs generation, etc, and Qualitative metrics like readability, code
clarity, efficiency, and maintainability, etc are measured.
2. Reliability – Reliability metrics express the reliability of software in different
conditions. The software is able to provide exact service at the right time or not
checked. Reliability can be checked using Mean Time Between Failure (MTBF) and
Mean Time To Repair (MTTR).
3. Performance – Performance metrics are used to measure the performance of the
software. Each software has been developed for some specific purposes. Performance
metrics measure the performance of the software by determining whether the software
is fulfilling the user requirements or not, by analyzing how much time and resource it
is utilizing for providing the service.
4. Usability – Usability metrics check whether the program is user-friendly or not.
Each software is used by the end-user. So it is important to measure that the end-user
is happy or not by using this software.
5. Correctness – Correctness is one of the important software quality metrics as this
checks whether the system or software is working correctly without any error by
satisfying the user. Correctness gives the degree of service each function provides as
per developed.
6. Maintainability – Each software product requires maintenance and up-gradation.
Maintenance is an expensive and time-consuming process. So if the software product
provides easy maintainability then we can say software quality is up to mark.
Maintainability metrics include the time required to adapt to new
features/functionality, Mean Time to Change (MTTC), performance in changing
environments, etc.
7. Integrity – Software integrity is important in terms of how much it is easy to
integrate with other required software which increases software functionality and
what is the control on integration from unauthorized software’s which increases the
chances of cyberattacks.
8. Security – Security metrics measure how secure the software is. In the age of cyber
terrorism, security is the most essential part of every software. Security assures that
there are no unauthorized changes, no fear of cyber attacks, etc when the software
product is in use by the end-user.
Metrics for the Design Model of the
Product
Metrics simply measures quantitative assessment that focuses on countable values most
commonly used for comparing and tracking performance of system. Metrics are used in
different scenarios like analyzing model, design model, source code, testing, and
maintenance. Metrics for design modeling allows developers or software engineers to
evaluate or estimate quality of design and include various architecture and component-
level designs.
Metrics by Glass and Card :
In designing a product, it is very important to have efficient management of complexity.
Complexity itself means very difficult to understand. We know that systems are generally
complex as they have many interconnected components that make it difficult to
understand. Glass and Card are two scientists who have suggested three design
complexity measures. These are given below :
1. Structural Complexity –
Structural complexity depends upon fan-out for modules. It can be defined as :
S(k) = f2out(k)
Where fout represents fanout for module k (fan-out means number of modules that are
subordinating module k).
2. Data Complexity –
Data complexity is complexity within interface of internal module. It is size and
intricacy of data. For some module k, it can be defined as :
D(k) = tot_var(k) / [fout(k)+1]
Where tot_var is total number of input and output variables going to and coming out
of module.
3. System Complexity –
System complexity is combination of structural and data complexity. It can be denoted
as:
Sy(k) = S(k)+D(k)
When structural, data, and system complexity get increased, overall architectural
complexity also gets increased.
Complexity metrics –
Complexity metrics are used to measure complexity of overall software. The computation
if complexity metrics can be done with help of a flow graph. It is sometimes called
cyclomatic complexity. The cyclomatic complexity is a useful metric to indicate
complexity of software system. Without use of complexity metrics, it is very difficult and
time-consuming to determine complexity in designing products where risk cost emanates.
Even continuous complexity analysis makes it difficult for project team and management
to solve problem. Measuring Software complexity leads to improve code quality, increase
productivity, meet architectural standards, reduce overall cost, increases robustness, etc.
To calculate cyclomatic complexity, following equation is used:
Cyclomatic complexity= E - N + 2
Example –
In diagram given below, you can see number of edges and number of nodes.
So, the Cyclomatic complexity can be calculated as –
Given,
E = 10,
N=8
So,
Cyclomatic complexity
=E-N+2
= 10 – 8 + 2
=4
Whether you're preparing for your first job interview or aiming to upskill in this ever-
evolving tech landscape.
Software Metrics
A software metric is a measure of software characteristics which are measurable or
countable. Software metrics are valuable for many reasons, including measuring software
performance, planning work items, measuring productivity, and many other uses.
Within the software development process, many metrics are that are all connected.
Software metrics are similar to the four functions of management: Planning, Organization,
Control, or Improvement.
1. Product Metrics: These are the measures of various characteristics of the software
product. The two important software characteristics are:
2. Process Metrics: These are the measures of various characteristics of the software
development process. For example, the efficiency of fault detection. They are used to measure
the characteristics of methods, techniques, and tools that are used for developing software.
Types of Metrics
Internal metrics: Internal metrics are the metrics used for measuring properties that are viewed
to be of greater importance to a software developer. For example, Lines of Code (LOC) measure.
External metrics: External metrics are the metrics used for measuring properties that are
viewed to be of greater importance to the user, e.g., portability, reliability, functionality,
usability, etc.
Hybrid metrics: Hybrid metrics are the metrics that combine product, process, and resource
metrics. For example, cost per FP where FP stands for Function Point Metric.
Project metrics: Project metrics are the metrics used by the project manager to
check the project's progress. Data from the past projects are used to collect
various metrics, like time and cost; these estimates are used as a base of new
software. Note that as the project proceeds, the project manager will check its
progress from time-to-time and will compare the effort, cost, and time with the
original effort, cost and time. Also understand that these metrics are used to
decrease the development costs, time efforts and risks. The project quality can
also be improved. As quality improves, the number of errors and time, as well as
in software development.
In the preparation of software quality specifications.
specifications.
In making inference about the effort to be put in the design and development of
or not.
These are useful for managing software products but not for evaluating the
environment.
Most of the predictive models rely on estimates of certain variables which are often
not known precisely.
Manual Test Metrics: What Are They and How Do They Work?
The below diagram illustrates the different stages in the test metrics life cycle.
To get the percentage execution status of the test cases, the following formula
can be used:
Percentage test cases executed = (No of test cases executed / Total no of
test cases written) x 100
Similarly, it is possible to calculate for other parameters also such as test cases
that were not executed, test cases that were passed, test cases that were
failed, test cases that were blocked, and so on. Below are some of the
formulas:
1. Test Case Effectiveness:
Test Case Effectiveness = (Number of defects detected / Number of test
cases run) x 100
2. Passed Test Cases Percentage: Test Cases that Passed Coverage is a
metric that indicates the percentage of test cases that pass.
Passed Test Cases Percentage = (Total number of tests ran / Total number
of tests executed) x 100
3. Failed Test Cases Percentage: This metric measures the proportion of all
failed test cases.
Failed Test Cases Percentage = (Total number of failed test cases / Total
number of tests executed) x 100
4. Blocked Test Cases Percentage: During the software testing process, this
parameter determines the percentage of test cases that are blocked.
Blocked Test Cases Percentage = (Total number of blocked tests / Total
number of tests executed) x 100
5. Fixed Defects Percentage: Using this measure, the team may determine
the percentage of defects that have been fixed.
Fixed Defects Percentage = (Total number of flaws fixed / Number of
defects reported) x 100
6. Rework Effort Ratio: This measure helps to determine the rework effort
ratio.
Rework Effort Ratio = (Actual rework efforts spent in that phase/ Total
actual efforts spent in that phase) x 100
7. Accepted Defects Percentage: This measures the percentage of defects
that are accepted out of the total accepted defects.
Accepted Defects Percentage = (Defects Accepted as Valid by Dev Team /
Total Defects Reported) x 100
8. Defects Deferred Percentage: This measures the percentage of the defects
that are deferred for future release.
Defects Deferred Percentage = (Defects deferred for future releases / Total
Defects Reported) x 100
1 No. of requirements 5
12 Defects fixed 12