Home > Design > Cohesion and Coupling: Two OO Design Principles

Cohesion and Coupling: Two OO Design Principles

Cohesion and Coupling deal with the quality of an OO design. Generally, good OO design should be loosely coupled and highly cohesive. Lot of the design principles, design patterns which have been created are based on the idea of “Loose coupling and high cohesion”.

The aim of the design should be to make the application:

  • easier to develop
  • easier to maintain
  • easier to add new features
  • less Fragile.


Coupling is the degree to which one class knows about another class. Let us consider two classes class A and class B. If class A knows class B through its interface only i.e it interacts with class B through its API then class A and class B are said to be loosely coupled.

If on the other hand class A apart from interacting class B by means of its interface also interacts through the non-interface stuff of class B then they are said to be tightly  coupled. Suppose the developer changes the class B‘s non-interface part i.e non API stuff then in case of loose coupling class A does not breakdown but tight coupling causes the class A to break.

So its always a good OO design principle to use loose coupling between the classes i.e all interactions between the objects in OO system should use the APIs. An aspect of good class and API design is that classes should be well encapsulated.

Another related thoughts on Coupling.


Cohesion is used to indicate the degree to which a class has a single, well-focused purpose. Coupling is all about how classes interact with each other, on the other hand cohesion focuses on how single class is designed. Higher the cohesiveness of the class, better is the OO design.

Benefits of Higher Cohesion:

  • Highly cohesive classes are much easier to maintain and less frequently changed.
  • Such classes are more usable than others as they are designed with a well-focused purpose.

Single Responsibility principle aims at creating highly cohesive classes.

  1. March 22nd, 2009 at 20:21 | #1

    Very good summary of cohesion and coupling

  2. April 3rd, 2009 at 00:52 | #2


    Thanks for the feedback!

    • Saket
      November 18th, 2009 at 16:22 | #3

      Very good explaination of cohesion and coupling

  3. Sergiu V
    October 27th, 2009 at 21:06 | #4

    Nice article. Thank you.

  4. March 19th, 2011 at 10:38 | #5

    Thanks for giving more and understandable about coupling and cohesion…

    • Mohamed Sanaulla
      March 23rd, 2011 at 23:52 | #6

      Thanks for reading the article!

  5. May 10th, 2011 at 21:07 | #7

    Many thanks for the clear explanation of both principles.

  6. May 12th, 2011 at 17:36 | #8

    well explained !

  7. Ahmed
    September 5th, 2011 at 22:38 | #9

    Very Special Definitions of both never find on other links, Thanks a lot !

  8. October 7th, 2011 at 18:56 | #10

    Nicely explained :)

  9. Murali Krishna.S
    October 19th, 2011 at 12:49 | #11

    hi thanks for explaining this 2 principles very clearly..and i feel very easy to understand

  10. arun kumar
    November 23rd, 2011 at 20:32 | #12

    txxxxxxxxx a lot a very good explanation

  11. Dilip
    January 24th, 2012 at 10:37 | #13

    Very well explained!! :)

  12. Manav
    March 1st, 2012 at 17:37 | #14

    very helpful explanation…. :)

  13. Jagat
    March 7th, 2012 at 23:20 | #15

    Found this on stack overflow. Good job sanaulla.

  14. Ankit
    March 18th, 2012 at 02:15 | #17

    Nice, simple and straight explanation.
    Good article!

  15. John
    April 7th, 2012 at 11:42 | #18

    Sorry, I do not understand. You did not include a simple example which clearly shows the concept. I don’t think that this answer will satisfy any knowledgeable and experienced interviewer.

  16. saloni jhanwar
    April 14th, 2012 at 21:29 | #19

    Copy paste for K&B, Do some real work then cheap ctrl+c ctrl+v

    • April 14th, 2012 at 21:51 | #20

      I dont think its a Ctrl+C and Ctrl+V. Its my understanding of the concept which I have written down. There might be a similarity in terms used and the similarity ends there.

  17. July 15th, 2012 at 02:38 | #21

    hi brother mohamed
    i want to know how i can measure the coupling and cohesion for set of software variants for example 10 products

  18. September 21st, 2012 at 13:43 | #22

    Nice post.Really it has a value .

    Thank you sir.

  19. Sagar
    October 3rd, 2012 at 19:37 | #23

    Mohamed, the explanation is very clear.. Thank you.. :)

  20. dhanveerhasan@gmail.com
    October 20th, 2012 at 07:05 | #24

    nice ….very wonder full……i and this concept loosely coupled each other

  21. November 12th, 2012 at 22:33 | #25

    Both concepts are difficult but due to this article i understand thes concepts.thankssss

  22. January 30th, 2013 at 06:19 | #26

    Best article found on the web about cohesion and coupling

  23. February 18th, 2013 at 02:09 | #27

    This is a very good article.
    You may also check http://www.agile-code.com/blog/cohesion-vs-coupling-separate-concerns/


  24. Shahid
    April 29th, 2013 at 10:58 | #28

    Hi.. good article but whats missing is . try and implement it with some code and than explain so that it will be easy for any1 to understand these concepts..

  25. Ashwani jain
    August 15th, 2013 at 14:33 | #29

    was easy and quick to grasp… just need to have some code examples..

  26. March 21st, 2014 at 15:06 | #30

    Thanks for a good explanation. Became simple to understand. Coupling (Married couples will be tightly coupled (have issues) if they know non-interface stuff)

  27. pooja joshi
    April 8th, 2014 at 11:49 | #31

    easy explanations.

  28. CodeNewbie
    June 28th, 2014 at 07:05 | #32

    very straight forward thank you very much

  29. techbrainless
    August 18th, 2014 at 00:28 | #33

    Awesome explanation. Thanks a lot Mr. Sanaulla.

  30. kisanet
    May 14th, 2015 at 19:15 | #34

    please explain it with more examples……….

  31. Radhakrishna Lutukurthi
    September 1st, 2015 at 18:39 | #35

    Really nice Article.

  1. December 8th, 2010 at 01:57 | #1
  2. February 1st, 2012 at 00:44 | #2