Explanation of Object-parameter-coupling as mentioned in Code Complete book
I have been reading up on the seminal and excellent book Code Complete. It discusses about the various kinds of couplings that can happen between modules(which may be classes as well as methods):
C++ vs Objective-C design principles of setters and getters
In C++ I was told that my classes shouldn’t have getters and setters: Doing it wrong… blog post.
Understanding high cohesion principle for methods in object oriented design
I know the idea of strong cohesion applies to methods as much it applies to classes. Just to be clear when I say strong cohesion of a method I mean a method which does only one task and does it well. This idea really works for simple getters and setters. But sometimes we usually come across methods that does more than one task internally , although it seems to be doing a single task if you look at a higher level of abstraction. An example of such a method can be :
Why sequential cohesion for operations in a method is not a good idea?
I read from the seminal Code Complete book that method statements that require to be executed in order passing parameter from one to the next is a code smell and is an example of a sequential cohesion. Why is this not a good idea?
Which of these OOP examples demonstrate proper OOP concepts?
I’m still trying to wrap my head around OOP. All of the following examples work, of course, but is there one (or possibly another) that best exemplifies OOP concepts?
Is object-oriented conceptual thinking something you build with experience? [closed]
It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago. I know that the answer is pretty clear […]
How to design member access for an Article-type class? [duplicate]
This question already has answers here: Is it bad practice to use public fields? [duplicate] (3 answers) Closed 11 years ago. I am doing a final project in a C++ class writing a very simple usenet-like client/server. I figure that since it’s usenet-like I’ll have a NewsGroup class and an Article class, I’m now working […]
Log design approach
Logging was always a nightmare for me! Now I have to implement it again for a proxy system.
In this proxy application, some systems ask proxy system to call some other services.
What I have to log is
Using public final rather than private getters
I see most immutable POJOs written like this:
Derived Class Method Naming
I’m having a hard time coming up with a good naming convention for methods in derived classes that serve the same purpose as the methods in the base class. For example, if both the base class, and the derived class, need to initialize: