Meaningless Drivel is fun!
The moose likes Beginning Java and the fly likes coupled  classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "coupled  classes" Watch "coupled  classes" New topic

coupled classes

Arun Prasath
Ranch Hand

Joined: Jul 18, 2006
Posts: 60
what is tightly coupled and loosely coupled classes?
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Try WikiPedia for computer science concepts. They do a far better job of explaining things than I would.

That said, the first time I put "coupling" in the WikiPedia search I got mechanical couplings with no link to computer science coupling. It can take a bit of digging around.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
Basically, the more tightly coupled A and B are, the more likely it is that if you change A, you will also have to change B.

Does that help?

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Muhammad Ahsan Jamshaid
Ranch Hand

Joined: Jun 01, 2006
Posts: 59
let A and B are 2 highly coupled classes...

Then change in A would highly affect the class B... mean B is much dependent upon A....

Degree of Coupling depends upon the degree of interdepndence b/w A&B...

More A and B are indpendent of each other less would be Coupling among them.


--Ahsan Jamshaid... SCJP 5(80%)
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

For example, Muhammad's post is tightly coupled to Ilja's.

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
subject: coupled classes
jQuery in Action, 3rd edition