<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[JavaRanch: Latest posts for the topic "coupling and cohesion in java"]]></title>
		<link>http://www.coderanch.com/forums/t/33/Beginning-Java/coupling-cohesion-java</link>
		<description><![CDATA[Latest messages posted in the topic "coupling and cohesion in java"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>coupling and cohesion in java</title>
				<description><![CDATA[what is coupling and cohesion in java1.5<br /> what is loose coupling,tight coupling?<br /> please give me some sites for good materials for this.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/411693/1813192</guid>
				<link>http://www.coderanch.com/forums/posts/preList/411693/1813192</link>
				<pubDate><![CDATA[Mon, Sep 1 2008 23:52:00 MDT]]></pubDate>
				<author><![CDATA[jeya prabha]]></author>
			</item>
			<item>
				<title>coupling and cohesion in java</title>
				<description><![CDATA[jeyaprabha, you have been warned to change your display name to make it conform to the JavaRanch <a class="snap_shots" href="http://www.javaranch.com/name.jsp" target="_new" rel="nofollow">naming policy</a> multiple times, and yet you have not changed it.<br />  <br /> Please read the naming policy carefully and change your display name. Specifically, your display name must consist of a first and a second name. Not just a first name.<br />  <br /> If you do not change your display name immediately, your account will be locked.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/411693/1813193</guid>
				<link>http://www.coderanch.com/forums/posts/preList/411693/1813193</link>
				<pubDate><![CDATA[Tue, Sep 2 2008 01:10:00 MDT]]></pubDate>
				<author><![CDATA[Jesper Young]]></author>
			</item>
			<item>
				<title>coupling and cohesion in java</title>
				<description><![CDATA[i have changed my display name]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/411693/1813194</guid>
				<link>http://www.coderanch.com/forums/posts/preList/411693/1813194</link>
				<pubDate><![CDATA[Tue, Sep 2 2008 04:05:00 MDT]]></pubDate>
				<author><![CDATA[jeya prabha]]></author>
			</item>
			<item>
				<title>coupling and cohesion in java</title>
				<description><![CDATA[<blockquote class="uncited">
			<div>Originally posted by jeya prabha:<br /> i have changed my display name</div>
		</blockquote>Thank you.<br />  <br /> Now you can have an answer.<br />  <br /> Cohesion means that the whole of a class sticks together (well, roughly). A class should be responsible for itself, should do one thing and as far as possible do everything for that one thing. A Car class should remember its make, colour, speed. It is responsible for changing speed; the speedUp() and slowDown() methods should be in the Car class; no other class should make your Car go faster or slower.<br />  <br /> Cohesion is (to quote Sellars and Yeatman) A Good Thing.<br />  <br /> Coupling means that one class gets at the implementation of another class.<pre>Driver campbell = new Driver();
Car ford = new Car(&quot;Ford&quot;, &quot;red&quot;);
 . . .
public class Driver
{
   Car myCar;
. . .
   public void goFaster(int speed)
   {
      myCar.speed += speed;
   }
. . .
}</pre>The Car class has allowed access to its <b>speed</b> field and the Driver class changes its value directly. This means other classes gain access to the implementation of the Car class; any changes to that implementation will "break" the Driver class. This is "tight coupling" and tight coupling is A Bad Thing, because any changes to one class can mean that other classes would have to be altered too.<br /> To avoid tight coupling<li>All classes should have as small a public interface as possible.</li><li>All non-constant fields should have private access.</li><li>Any alterations to the values of fields should be <i>via</i> method calls.</li>CR]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/411693/1813195</guid>
				<link>http://www.coderanch.com/forums/posts/preList/411693/1813195</link>
				<pubDate><![CDATA[Tue, Sep 2 2008 04:31:00 MDT]]></pubDate>
				<author><![CDATA[Campbell Ritchie]]></author>
			</item>
			<item>
				<title>coupling and cohesion in java</title>
				<description><![CDATA[simple,<br />  <br /> coupling = is the how much your class know about other class. let say that you have one friend and you know a lot about this friend as: What she do in the bathroom?<br /> but this you shoudn't know.<br /> The same happen with the class, when one know a lot about other.<br />  <br /> cohesion = is when you have  one class focus, one objective. for exaple:<br /> <pre>class AddCustomers{}</pre><br /> this is one class com high cohesion. because she has one focus. one class with low cohesion is when she does several somethinds example:<br /> - add customers<br /> - print list of the customers<br /> - connect BD<br /> all in one unique class this is one class com low cohesion.<br />  <br />  <img src="http://www.coderanch.com/images/smilies/ed515dbff23a0ee3241dcc0a601c9ed6.gif" />]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/411693/1813196</guid>
				<link>http://www.coderanch.com/forums/posts/preList/411693/1813196</link>
				<pubDate><![CDATA[Tue, Sep 2 2008 06:12:00 MDT]]></pubDate>
				<author><![CDATA[camilo lopes]]></author>
			</item>
	</channel>
</rss>
