Top "Class-design" questions

Refers to structural definition of class unit in object-oriented languages.

Nested Java enum definition - does declaring as static make a difference?

I have an interface - here's a nicely contrived version as an example: public interface Particle { enum Charge { POSITIVE, NEGATIVE } …

java enums class-design
How to initialize an NSObject's subclass on iPhone?

I want to write some methods in a class so that other classes can call these methods using [instance methodName:…

iphone initialization class-design subclass
Create class diagram from c++ source?

Is there any free tools available for generating class diagram from c++ source files and if possible for mfc source …

c++ class-design
How will I know when to create an interface?

I'm at a point in my development learning where I feel like I must learn more about interfaces. I frequently …

design-patterns oop interface class-design
UML class diagram: is this how to write abstract method and property?

When I was creating the first time an uml class diagram for a small C# project I had some trouble …

c# design-patterns uml class-design
Class members that are objects - Pointers or not? C++

If I create a class MyClass and it has some private member say MyOtherClass, is it better to make MyOtherClass …

c++ memory pointers class-design member
When should you use friend classes?

Possible Duplicate: When should you use 'friend' in C++? I have come to a stumbling block because of lack of …

c++ oop class class-design friend
static const Member Value vs. Member enum : Which Method is Better & Why?

If you want to associate some constant value with a class, here are two ways to accomplish the same goal: …

c++ class-design
python circular imports once again (aka what's wrong with this design)

Let's consider python (3.x) scripts: main.py: from test.team import team from test.user import user if __name__ == '__…

python dependencies class-design python-import
Python Class vs. Module Attributes

I'm interested in hearing some discussion about class attributes in Python. For example, what is a good use case for …

python attributes class-design module