Tagged Questions
2
votes
1answer
121 views
What does the “4” in LCOM4 mean?
I know that methods in a class should have high cohesion which roughly translates to having all the methods use all the instance variables directly or indirectly. I know that LCOM4 (Lack of ...
6
votes
5answers
473 views
Is having 'Util' classes a cause for concern? [closed]
I sometimes create 'Util' classes which primarily serve to hold methods and values that don't really seem to belong elsewhere. But every time I create one of these classes, I think "uh-oh, I'm gonna ...
3
votes
3answers
368 views
Is there a limit on how many global consts are used before an application is considered bad programming?
Basically, I develop websites, some large with many crud operations, etc...
However I've gotten into the habit of storing re-usable data as a constant in my PHP applications
I currently have 44 ...
0
votes
2answers
308 views
Is this bad design for a Shape interface?
I'm creating a vector editing program in C++, and I need a Shape interface which other concrete classes will implement. There is a requirement that no implementation inheritance is allowed. The design ...
16
votes
9answers
2k views
Is there any reason to use “plain old data” classes?
In legacy code I occasionally see classes that are nothing but wrappers for data. something like:
class Bottle {
int height;
int diameter;
Cap capType;
getters/setters, maybe a ...