how coupling is implemented in java programming wise?
posted 15 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
how to implement coupling in java? please provide some code snippets highlighting this
posted 15 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
What do you mean by "coupling"?
anish jain
Ranch Hand
Posts: 129
posted 15 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
coupling is the degree to which an object depends on other object
posted 15 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
What would "implementing coupling" mean?
posted 15 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Surely you want to avoid coupling?
Find a book like "Code Complete" by Steve McConnell, which (I think) has sections about coupling and coherence in.
Find a book like "Code Complete" by Steve McConnell, which (I think) has sections about coupling and coherence in.
posted 15 years ago
True, you can find many articles on google on the topic. According to good OO practices coupling should be less. According to coupling, each class should show its functionality to outside world through an interface.Other classes should see this interface and should understand what that class does. e.g.
interface DogInterface
{
walk();
run();
bark();
}
class Dog implements DogInterface
{
//...implementations
}
This is not possible to do always.. but if its done , its good.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
coupling is the degree to which an object depends on other object
True, you can find many articles on google on the topic. According to good OO practices coupling should be less. According to coupling, each class should show its functionality to outside world through an interface.Other classes should see this interface and should understand what that class does. e.g.
interface DogInterface
{
walk();
run();
bark();
}
class Dog implements DogInterface
{
//...implementations
}
This is not possible to do always.. but if its done , its good.
Good, Better, Best, Don't take rest until, Good becomes Better, and Better becomes Best.
Sidd : (SCJP 6 [90%] )
posted 15 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Surely it's a homework assignment, no? If so, then the FAQ's might be worthwhile reading.
posted 15 years ago
It goes beyond that, though.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Siddhesh Deodhar wrote:According to coupling, each class should show its functionality to outside world through an interface.
It goes beyond that, though.
posted 15 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
| Ever since I found this suit I've felt strange new needs. And a tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |











