What is the difference of delegator and dispatcher?
What is the difference of delegator and dispatcher?
Do unit tests sometimes break encapsulation? [duplicate]
This question already has answers here: Should I avoid private methods if I perform TDD? (14 answers) Closed 10 years ago. I very often hear the following: “If you want to test private methods, you’d better put that in another class and expose it.” While sometimes that’s the case and we have a hiding concept […]
How can I explain object-oriented programming to someone who’s only coded in Fortran 77?
My mother did her college thesis in Fortran, and now (over a decade later) needs to learn c++ for fluids simulations. She is able to understand all of the procedural programming, but no matter how hard I try to explain objects to her, it doesn’t stick. (I do a lot of work with Java, so I know how objects work) I think I might be explaining it in too high-level ways, so it isn’t really making sense to someone who’s never worked with them at all and grew up in the age of purely procedural programming.
Ways to ensure unique instances of a class?
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. I’m looking for different ways to ensure that each instance of a given class is a uniquely identifiable instance. For example, I have a […]
Are injectable classes allowed to have constructor parameters in DI?
Given the following code:
“Best fit” to avoid reuse of object instances in a collection
Imagine I have a collection of object instances which represent activities for a user to undertake. Dependent on user attributes, I have to randomly select instances to present activities to the user.
What kind of programs/solutions can only be written with OOP or are too hard to achieve without it? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for […]
How get and set accessors work
The standard method of implementing get and set accessors in C# and VB.NET is to use a public property to set and retrieve the value of a corresponding private variable. Am I right in saying that this has no effect of different instances of a variable? By this I mean, if there are different instantiations of an object, then those instances and their properties are completely independent right? So I think my understanding is correct that setting a private variable is just a construct to be able to implement the get and set pattern? Never been 100% sure about this.
Learning good OOP design and unlearning some bad habits [duplicate]
Possible Duplicate:
What books or resources would you recommend to learn practical OO design and development concepts?
Using dot to Access Object Attribute and Proper abstraction
I have been programming in python and Java for quite a number of years and one thing I find myself doing is using the setters and getters from Java in Python but a number of blogs seem to think using the dot notation for access is the pythonic way.