Top "Class-design" questions

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

Android: can I use one SQLiteOpenHelper class for multiple database files?

My app uses two databases (separate files). To handle these databases I have created two Helper classes which extend SQLiteOpenHelper, …

android database sqlite class-design
Using a class' __new__ method as a Factory: __init__ gets called twice

I encountered a strange bug in python where using the __new__ method of a class as a factory would lead …

python design-patterns inheritance class-design
why is java.lang.Throwable a class?

In java adjectives ending in -able are interfaces Serializable, Comparable etc... So why is Throwable a class? Wouldn't exception handling …

java exception-handling class-design
Overriding class variables in python

I'm trying to understand a bit how Python (2.6) deals with class, instances and so on, and at a certain point, …

python oop inheritance class-design
Howto design for extension

There is a Checkstyle rule DesignForExtension. It says: if you have a public/protected method which is not abstract nor …

java inheritance class-design
python 3: class "template" (function that returns a parameterized class)

I am trying to create a function that is passed a parameter x and returns a new class C. C …

python python-3.x class-design factory-pattern
C# generics - Can I make T be from one of two choices?

Suppose I have the following class hierarchy: Class A {...} Class B : A {...} Class C : A {...} What I currently have is …

c# .net class generics class-design
OO Javascript constructor pattern: neo-classical vs prototypal

I watched a talk by Douglas Crockford on the good parts in Javascript and my eyes were opened. At one …

javascript oop constructor class-design
UML class diagram: how to model relations about calling a method or starting an activity or service

I'm creating my first Android app. I have avoided to label associations with user or system interactions (e.g. I …

android uml class-design class-diagram object-oriented-analysis
Review my design : Tic tac toe game using OO methodology

This was asked as an interview question. Design a tic tac toe using object oriented principles. The interviewer said he …

java oop class-design