<p>I'm trying to boil down the concepts of coupling and cohesion to a concise definition. Can someone give me a short and understandable explanation (shorter than the definitions on Wikipedia <a href="http://en.wikipedia.org/wiki/Coupling_%28computer_science%29" rel="noreferrer">here</a> and <a href="http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29" rel="noreferrer">here</a>)? How do they interact?</p>

<p>Thanks.</p>

<p>Anybody have a good, short example?</p>

[{'answer_id': 39953, 'author': 'Thomas Owens', 'author_id': 572, 'author_profile': 'https://Stackoverflow.com/users/572', 'pm_score': 6, 'selected': False, 'text': '<p>Coupling - A measure of how much a module (package, class, method) relies on other modules. It is desirable to reduce coupling, or reduce the amount that a given module relies on the other modules of a system.</p>\n\n<p>Cohesion - A measure of how closely related the members (classes, methods, functionality within a method) of a module are to the other members of the same module. It is desirable to increase cohesion as that indicates that a module has a very specific task and does only that task.</p>\n'}, {'answer_id': 39968, 'author': 'Eduardo Diaz', 'author_id': 3245, 'author_profile': 'https://Stackoverflow.com/users/3245', 'pm_score': 2, 'selected': False, 'text': '<p>"Coupling is a measure of interdependencies between modules,\nwhich should be minimized"\n"cohesion, a quality to be maximized, focuses on the relationships\nbetween the activities performed by each module."</p>\n\n<p>quoted from this paper: <a href="http://steve.vinoski.net/pdf/IEEE-Old_Measures_for_New_Services.pdf" rel="nofollow noreferrer">http://steve.vinoski.net/pdf/IEEE-Old_Measures_for_New_Services.pdf</a></p>\n'}, {'answer_id': 39976, 'author': 'Hank Gay', 'author_id': 4203, 'author_profile': 'https://Stackoverflow.com/users/4203', 'pm_score': 2, 'selected': False, 'text': '<p>A quick-and-dirty way to measure coupling is to measure your <code>import</code> (or similar) statements.</p>\n'}, {'answer_id': 39988, 'author': 'Shog9', 'author_id': 811, 'author_profile': 'https://Stackoverflow.com/users/811', 'pm_score': 9, 'selected': True, 'text': "<p><strong>Coupling</strong></p>\n\n<ul>\n<li><p>Loose: You and the guy at the convenience store. You communicate through a well-defined protocol to achieve your respective goals - you pay money, he lets you walk out with the bag of Cheetos. Either one of you can be replaced without disrupting the system.</p></li>\n<li><p>Tight: You and your wife.</p></li>\n</ul>\n\n<p><strong>Cohesion</strong></p>\n\n<ul>\n<li><p>Low: The convenience store. You go there for everything from gas to milk to ATM banking. Products and services have little in common, and the convenience of having them all in one place may not be enough to offset the resulting increase in cost and decrease in quality.</p></li>\n<li><p>High: The cheese store. They sell cheese. Nothing else. Can't beat 'em when it comes to cheese though. </p></li>\n</ul>\n"}, {'answer_id': 40004, 'author': 'McKenzieG1', 'author_id': 3776, 'author_profile': 'https://Stackoverflow.com/users/3776', 'pm_score': 5, 'selected': False, 'text': '<p>One of the best comprehensive discussions of software design concepts related to OO (including these ones) is Bertrand Meyer\'s <a href="https://rads.stackoverflow.com/amzn/click/com/0136291554" rel="noreferrer" rel="nofollow noreferrer">Object Oriented Software Construction</a>.</p>\n\n<p>Regarding \'coupling\', he gives his Weak Coupling / Small Interfaces rule as follows:</p>\n\n<blockquote>\n  <blockquote>\n    <p><strong>If two modules communicate, they should exchange as little information as possible.</strong></p>\n  </blockquote>\n</blockquote>\n\n<p>Meyer\'s material related to cohesion isn\'t ever boiled down to a single pithy statement, but I think this sentence from Steve McConnell\'s <a href="https://rads.stackoverflow.com/amzn/click/com/0735619670" rel="noreferrer" rel="nofollow noreferrer">Code Complete</a> sums it up pretty well:</p>\n\n<blockquote>\n  <blockquote>\n    <p><strong>Cohesion refers to how closely all the routines in a class or all the code in a routine support a central purpose</strong></p>\n  </blockquote>\n</blockquote>\n'}, {'answer_id': 2294827, 'author': 'Mansoor Mehmood', 'author_id': 276781, 'author_profile': 'https://Stackoverflow.com/users/276781', 'pm_score': 5, 'selected': False, 'text': '<p>Coupling means dependency on others.<br>\nCohesion means completeness with itself.</p>\n'}]
['https://Stackoverflow.com/questions/39946', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1772/']