A methodology that enables a system to be modeled as a set of objects that can be controlled and manipulated in a modular manner

learn more… | top users | synonyms (3)

2
votes
2answers
181 views

An ideal way to decode JSON documents in C?

Assuming I have an API to consume that uses JSON as a data transmission method, what is an ideal way to decode the JSON returned by each API resource? For example, in Java I'd create a class for each ...
3
votes
1answer
356 views

Objects of different programming languages

Apparently, there are some resemblance between objects in JavaScript and dictionaries in Python. Each language defines an object a little different (and there is some logic that all definitions to be ...
2
votes
3answers
270 views

Is it good practice to return an array of objects?

If I have an ItemContainer class that contains, for example, items in an order, where each item is an Item object; is it best to have a method like: ItemContainer->getItems() that returns an ...
-3
votes
0answers
39 views

practicing “Create a Class Hierarchy and Object Map for the Concepts”

http://learnpythonthehardway.org/book/ex43.html This link is very helpful to better apply the concepts. So i took a little story from http://www.kidsworldfun.com/shortstories.php just to practice ...
1
vote
4answers
255 views

How to get Object Oriented Programming Concepts? [on hold]

What is the best way or best resources or tutorials to learn Object Oriented Programming? For instance, when I begin a program with Java and all my code goes into just one class and I can't estimate ...
4
votes
5answers
431 views

In what situations does it make sense to use an enumeration when writing object-oriented code?

Enumerations1 are often associated with procedural code rather than object-oriented code. They tend to give rise to similar switch statements scattered through the code, and in general, these are ...
15
votes
7answers
866 views

To rewrite or slowly refactor old C++ project

Our team has recently inherited a relatively large project from another company (~250k lines). It was developed using C++Builder and we intend to port the Ui side to Qt. Most of the Ui code is ...
0
votes
1answer
77 views

Sort rectangles in a grid based on a comparison of the center point of each

If I have a grid of rectangles and I move one of the rectangles, say above and to the left of another rectangle, how would I resort the rectangles? Note the rectangles are in an array, so each ...
1
vote
1answer
179 views

Is the Entity Component System architecture object oriented by definition?

Is the Entity Component System architecture object oriented, by definition? It seems more procedural or functional to me. My opinion is that it doesn't prevent you from implementing it in an OO ...
1
vote
1answer
50 views

how to model a connection to a resource, with rudimentary event processing

For my simple MUD client I'm using Apache Telnet (no, not ssh). A mud client is a strange beast: Generally, a MUD client is a very basic telnet client that lacks VT100 terminal emulation and the ...
0
votes
2answers
121 views

Python — when should a class have-a rather than be-a?

This is related to "Extends is evil" vs. OCP? but separate because the idea of "implement the interface" doesn't exist in Python. I'm writing a class to pull some data off a webpage. It's ...
3
votes
2answers
408 views

How does MVC work with the principle “Tell, Don't ask”?

Procedural code gets information then makes decisions. Object-oriented code tells objects to do things. — Alec Sharp So, when a view wants to display some information that is suppose to be ...
1
vote
1answer
245 views

a lot of small objects - OO pasta [closed]

In the code I am working on, there are a lot of really small objects like: class HasFieldLameSetter { public: HasFieldLameSetter(field& p_):m(_p){} void set(bool p2) ...
2
votes
2answers
226 views

What are appropriate metaphors for the pieces of a word processor?

A word processor is a complicated creature of many layers and pieces, but it represents a relatively simple concept: a piece of paper with writing on it. This leads to the problem of having many ...
2
votes
2answers
313 views

Interview question “What is virtual function”

It was funny for me, and I'm interesting the reaction for this question of the community. It was interview for C++/Qt developer, and question was asked "What is virtual function". Not something like ...

15 30 50 per page