Tagged Questions
A methodology that enables a system to be modeled as a set of objects that can be controlled and manipulated in a modular manner
1
vote
2answers
137 views
Should I use friend classes in C++ to allow access to hidden members?
Here is my situation (a simple example).
Say I have a class called HiddenData
Then I have another class called StoreHiddenData
And finaly a class called OperateHiddenData
Here's the thing, my ...
6
votes
3answers
185 views
Object-oriented design question
I am using a class through a dll to which I do not have direct control. So in effect, I am only a client of this class.
The class represents a form that can be printed, sent to clients and tracked ...
-1
votes
0answers
67 views
Handler classes vs. engine classes
It's common that some frameworks use handlers for async/sync notification processing. And as I see, there are two ways to approach the problem.
Example problem:
We have an class which in itself is ...
6
votes
9answers
239 views
Teaching Classes and Objects
I'm trying to teach how an object is just an instance of a class to a buddy of mine. However, he doesn't seem to understand it so well.
I've heard a ton of the examples (blueprint to a house, etc.) ...
-1
votes
0answers
69 views
What are the different programming paradigms? [closed]
Possible Duplicate:
What's a good resource for learning about all the different programming paradigms?
Are there any programming paradigms other than modular/structured programming, ...
3
votes
1answer
116 views
Can you point me to a nontrivial strategy pattern implementation?
We faced with quite branched registration model. With three main flows which often in some conditions could be switched between. Every flow has at least four different steps. Some steps has ...
11
votes
8answers
571 views
What is the point of an interface? [closed]
Possible Duplicate:
When to use abstract classes instead of interfaces and extension methods in C#?
What other reasons are there to write interfaces rather than abstract classes?
This ...
5
votes
3answers
129 views
Various programming concepts (from a Python viewpoint)
Ever since I've started lurking on stackoverflow, I keep coming across programming concepts such as abstract classes, virtual functions, contracts, interfaces, etc., from a questions about other ...
-2
votes
1answer
128 views
Learning OOP and Java “the right way,” or, SICP-like text for Java [closed]
I just finished my first CS course at UC Berkeley. We used an adaptation of SICP for Python 3.2, although I have since read a fair bit of the original myself. The course and material were fantastic: ...
6
votes
7answers
423 views
Should I pass an object into a constructor, or instantiate in class?
Consider these two examples:
Passing an object to a constructor
class ExampleA
{
private $config;
public function __construct($config)
{
$this->config = $config;
}
}
$config = new ...
6
votes
4answers
245 views
What is the best way to access multiple child properties?
I have a situation where I have to access several "sub-properties" of an object and find it quite appalling to write such code.
I was wondering how best to deal with this situation:
void Main()
{
...
7
votes
1answer
235 views
What is the name for the programming paradigm characterized by Go?
I'm intrigued by the way Go abandons class hierarchies and seems to completely abandon the notion of class in the typical object oriented sense. Also, I'm amazed at the way interfaces can be defined ...
4
votes
1answer
90 views
Private interfaces within a package
This is basically the same as Coding to interfaces, but played out in the real world of com when there are various engineering complexities such as immutability of published interfaces and ...
12
votes
7answers
470 views
How would Functional Programming proponents answer this statement in Code Complete?
On page 839 of the second edition, Steve McConnell is discussing all the ways that programmers can "conquer complexity" in big programs. His tips culminate with this statement:
"Object-oriented ...
2
votes
2answers
74 views
Would be semantically correct to make a “Login” constructor in an api class?
Since the methods of the class will only work if the user is logged in, is it right or is there some problem that might make my code slow/inneficient?