A methodology that enables a system to be modeled as a set of objects that can be controlled and manipulated in a modular manner
4
votes
6answers
622 views
Is there any difference between interfaces and abstract classes that have abstract methods only?
Let's say we have an abstract class and let this class has only abstract methods. Is this abstract class different from an interface that has same methods only?
What I am looking to know is if there ...
0
votes
1answer
97 views
JavaScript static methods retrieval
I have been thinking about it and wanted some feedback, recently I thought about doing it like this:
function foo(){
if ( !foo.prototype.statics ){
foo.prototype.statics = {
// ...
4
votes
5answers
347 views
Is there any difference between pointers and references? [duplicate]
References and pointers do the same thing as I know. Is there any difference between them?
If there is no difference, why we call them reference not pointer?
-2
votes
0answers
61 views
advice about good exercise book in OOP? [closed]
I am trying to look for a good book that has exercises in OOP in Java. I have gotten a bunch of books from my local library, but almost all of them they do not have exercises.
Does anybody knows any ...
1
vote
5answers
210 views
Do tools, like Windows Workflow, inhibit development growth? [closed]
I’ve had this gut feeling about Windows Workflow (WW) for a while now. And, until now, I couldn’t think of the right words to say in order to explain it. Since I think I have a good way to verbalize ...
10
votes
3answers
242 views
Dependency Inversion Principle: How to define “high-level policy” and “low-level detail” to other people?
I am trying to explain the dependency inversion principle to my (mostly junior) colleagues. How can we define which one is the "high-level policy" and which one is the "low-level detail" in a ...
0
votes
1answer
81 views
How does dependency inversion principle work in languages without interfaces?
In C#/Java, the dependency inversion principle is often demonstrated by high-level classes that depends on an interface/abstraction (that it owns). Low-level classes will implement the interface, thus ...
0
votes
1answer
160 views
Teaching `class`es and objects in C++ to university students
To learn classes and objects at my university, students are required to develop a simple game (nine-mens morris or something similar) using Java. Java is used because of its libraries and tool ...
6
votes
3answers
841 views
Why do some of object oriented languages let programmer use primitive types?
Why do some object oriented languages let the programmer use primitive data types?
Aren't classes like Integer, Boolean, etc. enough?
8
votes
6answers
815 views
Should my code be DRY or readable if it can't be both?
I'm writing Ruby code for a simple encryption exercise and have frequently run across this dilemma (the exercise is a solitaire cipher if you must know). It is a question of whether I should pad out ...
2
votes
3answers
147 views
Factory Method: does the Product have to be a different class than the Creator?
I want to build three sites in PHP. I'm doing this as slowly, thoughtfully and carefully as I can, to learn as much about things like OOP and software architecture as possible.
From past experience I ...
-1
votes
4answers
188 views
Immutable vs mutable object as returned parameter for class method [closed]
There is a class method (static method) in which I create and build some object. And for filling that object, I create it as mutable object.
My mutable object is a subclass of immutable object. So ...
2
votes
2answers
178 views
Writing OOPS code in Non Object Oriented Language
I was reading some article on the internet as I was preparing for interview and I found out below statement-
Writing object oriented code, even in non-object oriented language?
Is this statement ...
10
votes
3answers
825 views
“Too object-oriented”
I come from a strong OO background, and I have recently started working in an organization which, although the code is written in Java, has a lot less emphasis on good OO design than what I am used ...
4
votes
3answers
298 views
Is it acceptable for child classes to “break” parent class functionality?
One of the devs that works with me is following the Open/Closed Principle to add functionality to a Model by extending from our framework ORM.
class BaseModel extends ORM {
...
}
All our models ...