Yahoo India Web Search

Search results

  1. To achieve loose coupling, one should use abstract classes or interface while performing inheritance. The following examples will make the concept clearer. FileName: CouplingExample.java. // parent or base class class A { void foo () { System.out.println ("Inside the foo method of base class."); } } // child or derived class class B extends A ...

  2. May 14, 2010 · Loose Coupling means one class is dependent on interface rather than class. In tight coupling, there are hard-coded dependency declared in methods. In loose coupling, we must pass dependency externally at runtime instead of hard-coded. (Loose couple systems use interface for decreased dependency with class.)

  3. Dec 7, 2013 · Loose Coupling means reducing dependencies of a class that use a different class directly. In tight coupling, classes and objects are dependent on one another. In general, tight coupling is usually bad because it reduces flexibility and re-usability of code and it makes changes much more difficult and impedes testability etc. Tight Coupling. A ...

  4. Loose coupling occurs when the dependent class contains a pointer only to an interface, which can then be implemented by one or many concrete classes." In my example, my code would be loosely coupled to an ArrayList through the List interface. – Bill the Lizard. Oct 20, 2010 at 20:00.

  5. Oct 21, 2013 · Loose coupling just means that components are able to work together without assuming anything about the internal workings of each other. You do that because the more your components treat each other as black boxes, the easier it becomes to do changes at one component without affecting any others.

  6. Nov 14, 2013 · Loose-Coupling:-. In Loose-Coupling, when one object is depending on another class object, some external entity will provide that dependency object to the main object that external object we call as a Container. In order to get loose-coupling between objects the following two rules are required. The classes should follow POJI/POJO model.

  7. In all mentioned languages I can write something like this: Object1 = new Object1Class(); Object2 = new Object2Class(); Connect( Object1.ItemAdded, Object2.OnItemAdded ); Now if object1 calls/emits ItemAdded, the OnItemAdded method of Object2 will be called. Such loose coupling technique is often referred as 'delegates', 'signal-slot' or ...

  8. Dec 27, 2010 · 71. Dependency Injection (DI) doesn't reduce coupling, per se, because the component that relies on the dependency is still coupled to its dependency. What DI does accomplish, however, is to remove the responsibility of finding the dependency from the component itself, and placing that responsibility elsewhere.

  9. 0. High Cohesion: Qualitative degree to which a module focuses on one thing. low coupling: qualitative degree to which a module is connected to other modules and the outside world. ideally, a good module should focus on one specific thing and do it well while it should be shouldn't be too dependent on other modules.

  10. Jan 31, 2013 · 3. Loose coupling is properly achieved by the judicious application of strong encapsulation. Weak encapsulation may provide loose coupling but may also introduce loopholes that allow for visibility of methods and variables outside of the abstraction's scope (inadvertant tight coupling). Strong encapsulation however, does not imply anything ...

  1. People also search for