File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes High and Low Coupling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "High and Low Coupling" Watch "High and Low Coupling" New topic
Author

High and Low Coupling

Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
Hi all,

I was reading about this online.

A class that directly accesses member fields of another class, exhibits HIGH COUPLING.
When changing an implementation of a class, does not effect classes that use it, exhibits LOW COUPLING.


Can someone give me an example of a HighCoupling scenario and how Low coupling can be achieved in that case?

Thanks.
[ September 07, 2008: Message edited by: Arjun Reddy ]

Be Humble... Be Nice.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40059
    
  28
If you'd gone through beginners' (where I think this thread belongs ) you would have found this thread, which might answer your question.
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
Um... Campbell, can you give a code example of achieving loose coupling by using interfaces?

Thanks.
[ September 07, 2008: Message edited by: Arjun Reddy ]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40059
    
  28
Originally posted by Arjun Reddy:
Um... Campbell, can you give a code example of achieving loose coupling by using interfaces?

Thanks.
I can't think offhand how you would use interfaces to achieve loose coupling, sorry.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: High and Low Coupling