aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes What is called abstractly coupled? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "What is called abstractly coupled?" Watch "What is called abstractly coupled?" New topic
Author

What is called abstractly coupled?

Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
I came across with one line that is "The classes are abstractly coupled"!


Can somebody please give me example of this is this statement is really worth of!



Thanks,
cmbhatt


cmbhatt
megha joshi
Ranch Hand

Joined: Feb 20, 2007
Posts: 206
Check it out here...

http://www.inf.ucp.br/profs/tavares/2002_01/1-02.pdf

Abstract coupling
The purpose of an abstract classes A is to provide a signature so that other
pieces of software, such as a component B, can be implemented based on the
signature of A. B relies on the signature supported by the abstract class; that
is, B is abstractly coupled with the abstract class A. In an adapted framework
an implementation for the signature of the abstract class A is provided through
a concrete subclass A1, which the component B does not know of. Most
important, these components interact properly, that is, without change and
recompilation, with instances of all future extensions of the abstract classes.

Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
Thanks Megha for replying this deserted thread.

First paragraph goes to my brain without any if and but.
But some if but is there with the remaining para...


In an adapted framework
an implementation for the signature of the abstract class A is provided through
a concrete subclass A1, which the component B does not know of. Most
important, these components interact properly, that is, without change and
recompilation, with instances of all future extensions of the abstract classes.


Following is what I could manage to grasp:

It means you need not to worry if the Abstract class is modified; with the references of the abstract class all the concrete implementations interact seamlessly regardless of any future extensions in the abstract class.


Please give a focus on it!
megha joshi
Ranch Hand

Joined: Feb 20, 2007
Posts: 206
Hi Chandra,

I think you are right except for the change I think below...

It means you need not to worry if the Abstract class is modified(should be extended not modified); with the references of the abstract class all the concrete implementations interact seamlessly regardless of any future extensions in the abstract class.

Interfaces are like abstract classes, except for some technical differences....I guess Its same as programming to the interfaces where we dont rely on the concrete implementation ...just the method signature is used to implement our class. Thus when we program a class based on the methods found in the interface or abstract class....I think our class is abstractly coupled with it. In other words , only if the abstract class defination changes or the interface changes , then there is a chance our implementation would be affected. Our implementation would not be affected...no matter how many times the abstract class is extended and its methods overridden by the other classes. They all follow the same signature of the methods that we use from the abstract class.

I can't think of a good code example...
Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
OK Megha,

You means extension of abstract class.
I think extending an interface means simply creating another interface that will have methods from the previous interface through "extends"

SortedSet extends Set

It means all the concrete implementation which were implementing Set wont be affected from the Set extension. But from now whichever class implement the SortedSet interface will have added benefit of keeping the objects in sorted order.

Abstractly coupled means the concrete class is under the obligation to implement the abstract class methods (abstract methods of course). And in case of future extension of the class (as you said) it will go on running without any problem because nobody is going to change the existing abstract class (adding abstract methods to it only); thus breaking the code of world.(IN every nook and corner, we would have to implement those methods). A new abstract class will be introduced that extends the existing abstract class to enhance the feature. I find so many classes around our API's.

Is that OK Megha?
megha joshi
Ranch Hand

Joined: Feb 20, 2007
Posts: 206
Yes you are right
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is called abstractly coupled?