0% found this document useful (0 votes)
45 views20 pages

Oose Notes

The document discusses different types of module coupling and cohesion in software engineering. It defines coupling as the degree of interdependence between software modules, and cohesion as the strength of relationships between pieces of functionality within a module. The document then describes various types of coupling and cohesion, and provides examples to differentiate between coupling and cohesion.

Uploaded by

S.mahammad Rafi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views20 pages

Oose Notes

The document discusses different types of module coupling and cohesion in software engineering. It defines coupling as the degree of interdependence between software modules, and cohesion as the strength of relationships between pieces of functionality within a module. The document then describes various types of coupling and cohesion, and provides examples to differentiate between coupling and cohesion.

Uploaded by

S.mahammad Rafi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Coupling and Cohesion

Module Coupling

In software engineering, the coupling is the degree of


interdependence between software modules. Two modules
that are tightly coupled are strongly dependent on each other.
However, two modules that are loosely coupled are not
dependent on each other. Uncoupled modules have no
interdependence at all within them.

The various types of coupling techniques are shown in fig:

A good design is the one that has low coupling. Coupling is


measured by the number of relations between the modules.

Types of Module Coupling

1. No Direct Coupling: There is no direct coupling between


M1 and M2.

In this case, modules are subordinates to different modules.


Therefore, no direct coupling.

2. Data Coupling: When data of one module is passed to


another module, this is called data coupling.
3. Stamp Coupling: Two modules are stamp coupled if they
communicate using composite data items such as structure,
objects, etc. When the module passes non-global data
structure or entire structure to another module, they are said
to be stamp coupled. For example, passing structure variable
in C or object in C++ language to a module.

4. Control Coupling: Control Coupling exists among two


modules if data from one module is used to direct the
structure of instruction execution in another.

5. External Coupling: External Coupling arises when two


modules share an externally imposed data format,
communication protocols, or device interface. This is related
to communication to external tools and devices.

6. Common Coupling: Two modules are common coupled if


they share information through some global data items.

7. Content Coupling: Content Coupling exists among two


modules if they share code, e.g., a branch from one module
into another module.

Module Cohesion

In computer programming, cohesion defines to the degree to


which the elements of a module belong together. Thus,
cohesion measures the strength of relationships between
pieces of functionality within a given module. For example, in
highly cohesive systems, functionality is strongly related.

Cohesion is an ordinal type of measurement and is generally


described as "high cohesion" or "low cohesion."

1. Functional Cohesion: Functional Cohesion is said to exist


if the different elements of a module, cooperate to achieve a
single function.

2. Sequential Cohesion: A module is said to possess


sequential cohesion if the element of a module form the
components of the sequence, where the output from one
component of the sequence is input to the next.

3. Communicational Cohesion: A module is said to have


communicational cohesion, if all tasks of the module refer to
or update the same data structure, e.g., the set of functions
defined on an array or a stack.

4. Procedural Cohesion: A module is said to be procedural


cohesion if the set of purpose of the module are all parts of a
procedure in which particular sequence of steps has to be
carried out for achieving a goal, e.g., the algorithm for
decoding a message.

5. Temporal Cohesion: When a module includes functions


that are associated by the fact that all the methods must be
executed in the same time, the module is said to exhibit
temporal cohesion.
6. Logical Cohesion: A module is said to be logically cohesive
if all the elements of the module perform a similar operation.
For example Error handling, data input and data output, etc.

7. Coincidental Cohesion: A module is said to have


coincidental cohesion if it performs a set of tasks that are
associated with each other very loosely, if at all.

Differentiate between Coupling and Cohesion

Coupling Cohesion

Coupling is also called Inter- Cohesion is also called Intra-


Module Binding. Module Binding.

Coupling shows the relationships Cohesion shows the


between modules. relationship within the
module.

Coupling shows the Cohesion shows the


relative independence between module's
the modules. relative functional strength.

While creating, you should aim for While creating you should
low coupling, i.e., dependency aim for high cohesion, i.e., a
among modules should be less. cohesive component/
module focuses on a single
function (i.e., single-
mindedness) with little
interaction with other
modules of the system.

In coupling, modules are linked to In cohesion, the module


the other modules. focuses on a single thing.
Difference between white-box testing and black-box
testing

Following are the significant differences between white box


testing and black box testing:

White-box testing Black box testing

The developers can perform The test engineers perform the


white box testing. black box testing.

To perform WBT, we should To perform BBT, there is no need


have an understanding of the to have an understanding of the
programming languages. programming languages.

In this, we will look into the In this, we will verify the


source code and test the logic functionality of the application
of the code. based on the requirement
specification.

In this, the developer should In this, there is no need to know


know about the internal about the internal design of the
design of the code. code.

DIFFERENCES BETWEEN BLACK BOX TESTING VS WHITE BOX


TESTING:

Black Box Testing White Box Testing

It is a way of testing the


It is a way of software testing
software in which the tester
in which the internal structure
has knowledge about the
or the program or the code is
internal structure or the code
hidden and nothing is known
or the program of the
about it.
software.
Black Box Testing White Box Testing

Code implementation is
Implementation of code is not
necessary for white box
needed for black box testing.
testing.

It is mostly done by software It is mostly done by software


testers. developers.

No knowledge of Knowledge of implementation


implementation is needed. is required.

It can be referred to as outer or It is the inner or the internal


external software testing. software testing.

It is a functional test of the It is a structural test of the


software. software.

This testing can be initiated This type of testing of software


based on the requirement is started after a detail design
specifications document. document.

No knowledge of programming It is mandatory to have


is required. knowledge of programming.

It is the behavior testing of the It is the logic testing of the


software. software.

It is generally applicable to the


It is applicable to the higher
lower levels of software
levels of testing of software.
testing.

It is also called as clear box


It is also called closed testing.
testing.

It is least time consuming. It is most time consuming.


Black Box Testing White Box Testing

It is not suitable or preferred It is suitable for algorithm


for algorithm testing. testing.

Data domains along with


Can be done by trial and error
inner or internal boundaries
ways and methods.
can be better tested.

Example: Search something on Example: By input to check


google by using keywords and verify loops

Black-box test design


techniques- White-box test design
 Decision table testing techniques-
 All-pairs testing  Control flow testing
 Equivalence  Data flow testing
partitioning  Branch testing
 Error guessing

Types of Black Box Testing: Types of White Box Testing:


 Functional Testing  Path Testing
 Non-functional testing  Loop Testing
 Regression Testing  Condition testing

It is comparatively more
It is less exhaustive as
exhaustive than black box
compared to white box testing.
testing.
White Box Testing

The box testing approach of software testing consists of black


box testing and white box testing. We are discussing here
white box testing which also known as glass box is testing,
structural testing, clear box testing, open box testing and
transparent box testing.

The term 'white box' is used because of the internal


perspective of the system. The clear box or white box or
transparent box name denote the ability to see through the
software's outer shell into its inner workings.
The term 'white box' is used because of the internal
perspective of the system. The clear box or white box or
transparent box name denote the ability to see through the
software's outer shell into its inner workings.

The white box testing contains various tests, which are as


follows:

o Path testing
o Loop testing
o Condition testing
o Testing based on the memory perspective
o Test performance of the program

Path testing

In the path testing, we will write the flow graphs and test all
independent paths. Here writing the flow graph implies that
flow graphs are representing the flow of the program
Loop testing

In the loop testing, we will test the loops such as while, for,
and do-while, etc. and also check for ending condition if
working correctly and if the size of the conditions is enough.

For example: we have one program where the developers have


given about 50,000 loops.

1. {
2. while(50,000)
3. ……
4. ……
5. }
Condition testing

In this, we will test all logical conditions for


both true and false values; that is, we will verify for
both if and else condition.

For example:

1. if(condition) - true
2. {
3. …..
4. ……
5. ……
6. }
7. else - false
8. {
9. …..
10. ……
11. ……
12. }
Testing based on the memory (size) perspective

The size of the code is increasing for the following reasons:


o The reuse of code is not there: let us take one example,
where we have four programs of the same application,
and the first ten lines of the program are similar.
o The developers use the logic that might be modified. If
one programmer writes code and the file size is up to
250kb, then another programmer could write a similar
code using the different logic, and the file size is up to
100kb.
o Int a=15;
o Int b=20;
o String S= "Welcome";
o ….
o …..
o …..
o ….
o …..
o Int p=b;
o Create user()
o {
o ……
o ……
o ….. 200's line of code
o }

Reasons for white box testing

o It identifies internal security holes.


o To check the way of input inside the code.
o Check the functionality of conditional loops.
o To test function, object, and statement at an individual
level.

Advantages of White box testing

o White box testing optimizes code so hidden errors can be


identified.
o Test cases of white box testing can be easily automated.
o Easy to automate.
o White box testing can be easily started in Software
Development Life Cycle.
o Easy Code Optimization.

Disadvantages of White box testing

o White box testing is too much time consuming when it


comes to large-scale programming applications.
o White box testing is much expensive and complex.
o It can lead to production error because it is not detailed
by the developers.
o It is very expensive.
o Missing functionalities cannot be detected as the code
that exists is tested.
o Very complex and at times not realistic.
o Much more chances of Errors in production.

Black box testing

Black box testing is a technique of software testing which


examines the functionality of software without peering into its
internal structure or coding. The primary source of black box
testing is a specification of requirements that is stated by the
customer.

In this method, tester selects a function and gives input value


to examine its functionality, and checks whether the function
is giving expected output or not. If the function produces
correct output, then it is passed in testing, otherwise failed.
The test team reports the result to the development team and
then tests the next function. After completing testing of all
functions if there are severe problems, then it is given back to
the development team for correction.
Generic steps of black box testing

o The black box test is based on the specification of


requirements, so it is examined in the beginning.
o In the second step, the tester creates a positive test
scenario and an adverse test scenario by selecting valid
and invalid input values to check that the software is
processing them correctly or incorrectly.
o In the third step, the tester develops various test cases
such as decision table, all pairs test, equivalent division,
error estimation, cause-effect graph, etc.
o The fourth phase includes the execution of all test cases.
o In the fifth step, the tester compares the expected output
against the actual output.
o In the sixth and final step, if there is any flaw in the
software, then it is cured and tested again

Test procedure

The test procedure of black box testing is a kind of process in


which the tester has specific knowledge about the software's
work, and it develops test cases to check the accuracy of the
software's functionality.

Test cases

Test cases are created considering the specification of the


requirements. These test cases are generally created from
working descriptions of the software including requirements,
design parameters, and other specifications
Test cases are mainly designed for functional testing but can
also be used for non-functional testing. Test cases are
designed by the testing team, there is not any involvement of
the development team of software.

BlackBoxTestingType
The following are the several categories of black box testing:
1. Functional Testing
2. Regression Testing
3. Nonfunctional Testing (NFT)
Functional Testing: It determines the system’s software
functional requirements.
Regression Testing: It ensures that the newly added code is
compatible with the existing code. In other words, a new
software update has no impact on the functionality of the
software. This is carried out after a system maintenance
operation and upgrades.
Nonfunctional Testing: Nonfunctional testing is also known
as NFT. This testing is not functional testing of software. It
focuses on the software’s performance, usability, and
scalability
. Advantages of Black Box Testing:
It is efficient for implementing the tests in the larger system.
Tests are executed from the user’s or client’s point of view.
Test cases are easily reproducible.
Disadvantages of Black Box Testing:
 There is a possibility of repeating the same tests while
implementing the testing process.
 Sometimes, the reason for the test failure cannot be
detected.
 Some programs in the application are not tested.
 It does not reveal the errors in the control structure.
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.

Classification of Software Metrics

Software metrics can be classified into two types as


follows:

1. Product Metrics: These are the measures of various


characteristics of the software product. The two important
software characteristics are:

1. Size and complexity of software.


2. Quality and reliability of software.

These metrics can be computed for different stages of SDLC.

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.

ypes 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.

Advantage of Software Metrics

Comparative study of various design methodology of software


systems.

In comparing and evaluating the capabilities and productivity


of people involved in software development.

In the preparation of software quality specifications.

In the verification of compliance of software systems


requirements and specifications.

In the allocation of testing resources for testing the code.

Disadvantage of Software Metrics

The application of software metrics is not always easy, and in


some cases, it is difficult and costly.

The verification and justification of software metrics are based


on historical/empirical data whose validity is difficult to verify.

These are useful for managing software products but not for
evaluating the performance of the technical staff.

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
Major Software Quality Assurance Activities:

1. SQA Management Plan:


Make a plan for how you will carry out the sqa
through out the project. Think about which set of
software engineering activities are the best for
project. check level of sqa team skills.

2. Set The Check Points:


SQA team should set checkpoints. Evaluate the
performance of the project on the basis of collected
data on different check points.

3. Multi testing Strategy:


Do not depend on a single testing approach. When
you have a lot of testing approaches available use
them.

4. Measure Change Impact:


The changes for making the correction of an error
sometimes re introduces more errors keep the
measure of impact of change on project. Reset the
new change
Manage Good Relations:
In the working environment managing good relations
with other teams involved in the project development is
mandatory. Bad relation of sqa team with programmers
team will impact directly and badly on project. Don’t play
politics.
Benefits of Software Quality Assurance (SQA):

1. SQA produces high quality software.


2. High quality application saves time and cost.
3. SQA is beneficial for better reliability.
1. . Improving the process of creating software.
2. Improves the quality of the software.

What are clients need in software ?


Some common client needs include:
1. Functionality - clients want software that performs its
intended functions effectively and efficiently.

2. Usability - clients want software that is easy to use and


understand.

3. Reliability - clients want software that is reliable and


performs consistently over time.

4. Security - clients want software that is secure and


protects sensitive data.

5. Scalability - clients want software that can handle


increasing volumes of users, data, and requests.

6. Maintainability - clients want software that is easy to


maintain and update over time.
7. Integration - clients want software that can integrate with
other systems and technologies.

8. Customization - clients want software that can be


customized to meet their specific needs and requirements.

9. Support - clients want access to support and assistance in


using the software.

10. Cost-effectiveness - clients want software that provides


value for their investment and fits within their budget

What is UML?
UML is a standard language for specifying, visualizing,
constructing, and documenting the artifacts of software
systems. UML was created by the Object Management Group
(OMG) and UML 1.0 specification draft was proposed to the
OMG in January 1997. OMG is continuously making efforts
to create a truly industry standard.  UML stands for Unified
Modeling Language.  UML is different from the other
common programming languages such as C++, Java,
COBOL, etc.  UML is a pictorial language used to make
software blueprints.  UML can be described as a general
purpose visual modeling language to visualize, specify,
construct, and document software system.  Although UML
is generally used to model software systems, it is not limited
within this boundary.  It is also used to model non-software
systems as well. For example, the process flow in a
manufacturing unit, etc. UML is not a programming
language but tools can be used to generate code in various
languages using UML diagrams. UML has a direct relation
with object oriented analysis and design. After some
standardization, UML has become an OMG standard

BUSINESS MODEL
Every business or company makes a plan for generating
profit. They create a model for identifying products and
services to sell, the market they want to target and also take
into account anticipated expenses. This is known as
business models.

Even if the business is already established or even if it is a


new business, a plan needs to be made. Businesses need to
regularly update their plans and strategy as they need to
take into account the challenges and trends for future
models.

Importance of Business Models


The business model helps to target the customer base of the
company. It helps in making marketing strategies, and
projections of revenues and expenses taking into account the
type of Business models and clientele.

Every investor needs to review the business model in order to


get knowledge about the company’s competitive edge.
Understanding the business model helps investors to have a
better sense of financial data.
What are Business Models Types?
We will discuss here 4 business models types:

1. Business -To- Business Models (B2B)


When dealings or transactions take place between two
companies or businesses then this type of business model is
known as business to the business model.

It has good market predictability and more market stability.


Since under B2B sale is made in bulk amount this model
leads to lower cost for the businesses.
2. Business -To-Consumer Models (B2C)
The business-2-consumer business model is a model that
refers to businesses that sell their services or products
directly to the consumer who are the end users of the
products or services.

3. Subscription-Based Models
Any application-based businesses or software companies
have subscription-based business models. They offer their
product as a one-time purchase, in return company earns
monthly or annual revenues.

4. On-Demand Business Model


It is the most recent form of model which is made out on the
need by answering immediately. This type of business model
is prepared in such a way that all the questions will be
answered by just a click of a button in seconds.

Advantages of Business Models


 A good business model gives the company a
competitive edge in the industry.
 Making the business model strong leads to an ongoing
business profit leading to an increase in cash reserve
and new investments.
 A proven business model brings financial stability to the
organization
Disadvantages of the Business Model
 Once a business model is created, then it restricts to
implementation new ideas for the product.
 Creating a business model is time-consuming as a lot of
factors need to be considered.
 There might be a chance that the business model may
turn out to be inaccurate

You might also like