Top "Class-design" questions

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

Why is __init__() always called after __new__()?

I'm just trying to streamline one of my classes and have introduced some functionality in the same style as the …

python design-patterns class-design
no default constructor exists for class

#include "Includes.h" enum BlowfishAlgorithm { ECB, CBC, CFB64, OFB64, }; class Blowfish { public: struct bf_key_st { unsigned long P[18]; unsigned …

c++ class constructor class-design default-constructor
How do you design object oriented projects?

I'm working on a large project (for me) which will have many classes and will need to be extensible, but …

architecture oop class-design
PHP 5: const vs static

In PHP 5, what is the difference between using const and static? When is each appropriate? And what role does public, …

php object constants class-design static-members
How do I alias a class name in C#, without having to add a line of code to every file that uses the class?

I want to create an alias for a class name. The following syntax would be perfect: public class LongClassNameOrOneThatContainsVersionsOrDomainSpecificName { ... } public …

c# class-design
UML Class Diagram for User Login

The diagram below is my very first attempt at creating a UML class diagram describing a user login into a …

design-patterns oop class-design uml
How would you code an efficient Circular Buffer in Java or C#?

I want a simple class that implements a fixed-size circular buffer. It should be efficient, easy on the eyes, generically …

c# java class-design
USE case to Class Diagram - How do I?

I would like your guidance on how to create classes and their relationships (generalization, association, aggregation and composition) accurately from …

design-patterns oop class-design uml
How do I design a class in Python?

I've had some really awesome help on my previous questions for detecting paws and toes within a paw, but all …

python oop class-design
Best practice: ordering of public/protected/private within the class definition?

I am starting a new project from the ground up and want it to be clean / have good coding standards. …

oop coding-style class-design