coupling

How Do I Avoid using Running Totals in My Code?

I am learning programing and software design and Java in school right now. The class that is getting me mixed up is Software Design. We are using Word to run simple VB code to do simple programs. My instructor says I am losing cohesion by using running totals. I am having a hard time thinking of a way to avoid them. Here is an examp...

Would you say .Net remoting relies on tight coupling?

Given that both the client and the server need to know everything about the object being remoted, firstly is this tight coupling, and secondly can .Net Remoting work in any other way? ...

Does this method violate SOLID or has code smell?

Does this give any code smell or violate SOLID principles? public string Summarize() { IList<IDisplayable> displayableItems = getAllDisplayableItems(); StringBuilder summary = new StringBuilder(); foreach(IDisplayable item in displayableItems) { if(item is Human) summary.Append("The person is " + item.GetInfo()); else ...

When classes want to couple

I am having an issue with 2 classes that were once nicely separated, but now they want to couple. Without getting too much into the specifics of the problem, here it is: I used to have a class Triangle that contained 3 space-position vertices. class Triangle { Vertex a,b,c ; // vertices a, b and c } ; There were many Triangle in...

Model Using Modules in Rails Application

I have a model that requires loading external data from an auxiliary source. A number of web services exist that my model can fetch the data from (swappable), but I don't want to create code that will make it difficult to change services (costs significantly differ based on variable and fixed usage and it is likely changing will be requi...