Have I understood OOP correctly?
I had originally posed this on StackOverflow. The question was closed and I was asked to post this here instead. Here is the original question I had posted there:
Good design pattern for a c++ wrapper around a c object
I have written an extensible c++ wrapper around a very hard to use but also very useful c library. The goal is to have the convience of c++ for allocating the object, exposing its properties, deallocating the object, copy semantics etc…
How to share common methods if objects have different roles?
If 2 classes have the following in common:
Does the state Pattern violate Liskov Substitution Principle?
This image is taken from Applying Domain-Driven Design and Patterns: With Examples in C# and .NET
OO Design related questions in technical interviews [closed]
Closed 9 years ago.
Can a common interface be defined for Cartesian and Polar coordinate data?
I’m rewriting a set of file readers that a former-colleague of mine created that read raw-point data of XYZ (Cartesian) coordinates or RTZ (Polar) coordinates. Currently the data is stored directly in the reader, making everything rely on the state of those objects. I’d like to separate the reader from the collected data it reads by creating some data objects.
How to get a reference to a central AssetLoader in every Widget?
I’m working on a simple UI system for a game. The building blocks are Widget
objects, which can contain each other. There are several sub classes of Widget
, e.g. LabelWidget
, ImageWidget
and ButtonWidget
.
terminology for upward devolution from modules to framework
Is there a word for the problem of a framework becoming married to the software modules it supports, for example adding methods to a base class that may apply only to certain subclasses or use cases? It’s a particular kind of violation of separation of concerns.
Is function overloading in general considered Evil? [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. Recently I found about two new programming languages(Vala […]
Automated object creation from user input
I am working on a command-line application that runs simulations. It has to be heavily configurable; the user should be able to provide a very large number (100+) of parameters, some mandatory and some optional. Obviously, these parameters will be used by a variety of classes in the application.