Click here to Skip to main content
15,887,683 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: OOP Programming, Two approachs for a problem Pin
Quake2Player24-Mar-09 7:31
Quake2Player24-Mar-09 7:31 
GeneralRe: OOP Programming, Two approachs for a problem Pin
Jonathan Davies24-Mar-09 8:51
Jonathan Davies24-Mar-09 8:51 
Questioncomposite pattern serializing Pin
Jarno Burger20-Mar-09 13:18
Jarno Burger20-Mar-09 13:18 
AnswerRe: composite pattern serializing Pin
Jonathan Davies22-Mar-09 5:14
Jonathan Davies22-Mar-09 5:14 
QuestionObject Oriented Design - object graphs and lookup table data Pin
Leftyfarrell13-Mar-09 2:09
Leftyfarrell13-Mar-09 2:09 
AnswerRe: Object Oriented Design - object graphs and lookup table data Pin
led mike13-Mar-09 5:03
led mike13-Mar-09 5:03 
GeneralRe: Object Oriented Design - object graphs and lookup table data Pin
Leftyfarrell14-Mar-09 3:58
Leftyfarrell14-Mar-09 3:58 
QuestionEmpty abstract method override -- good or bad design? Pin
brontofuzik12-Mar-09 10:46
brontofuzik12-Mar-09 10:46 
Hi,

the situation is as follows:

There are 2 classes - C1 and C2 - both inherited from an abstract class A. The reason is that instances of C1 and C2 are to be stored in an inhomogeneous collection, and a common base class (A) is used to access their functionality (textbook polymorphism).

The abstract class A defines an abstract method M. This is meaningfully overriden in C1, but has no meaningful override in C2.
Common sense would suggest to remove it from the abstract class if either of its derived classes are unable to override it meaningfully.
However, the logic of the situation requires M to be defined in the abstract class A.

My questions are these:

1. Is it a sign of good or bad design to write empty abstract method overrides?
2. Is it a sign of good or bad design to write abstract method overrides that only throw an exception informing the user of an incorrect usage?
3. How common are the empty abstract method overrides in real-world programming practice?

Your answers are greatly appreciated!

Lukas
AnswerRe: Empty abstract method override -- good or bad design? Pin
Luc Pattyn12-Mar-09 10:57
sitebuilderLuc Pattyn12-Mar-09 10:57 
AnswerRe: Empty abstract method override -- good or bad design? Pin
Mark Churchill12-Mar-09 14:39
Mark Churchill12-Mar-09 14:39 
GeneralRe: Empty abstract method override -- good or bad design? Pin
Luc Pattyn12-Mar-09 15:05
sitebuilderLuc Pattyn12-Mar-09 15:05 
GeneralRe: Empty abstract method override -- good or bad design? Pin
Mark Churchill12-Mar-09 15:14
Mark Churchill12-Mar-09 15:14 
QuestionTechnical Design vs. Implementation vs. Testing Pin
shakhtyor12-Mar-09 10:45
shakhtyor12-Mar-09 10:45 
AnswerRe: Technical Design vs. Implementation vs. Testing Pin
Perry Holman22-Apr-09 0:16
Perry Holman22-Apr-09 0:16 
AnswerRe: Technical Design vs. Implementation vs. Testing Pin
Robin_Roy23-Jul-09 16:38
Robin_Roy23-Jul-09 16:38 
QuestionLearning UML Pin
Brendan Vogt11-Mar-09 23:45
Brendan Vogt11-Mar-09 23:45 
AnswerRe: Learning UML Pin
User 171649212-Mar-09 0:17
professionalUser 171649212-Mar-09 0:17 
AnswerRe: Learning UML Pin
shakhtyor12-Mar-09 10:25
shakhtyor12-Mar-09 10:25 
QuestionUML Software Pin
Brendan Vogt10-Mar-09 21:08
Brendan Vogt10-Mar-09 21:08 
AnswerRe: UML Software Pin
Pete O'Hanlon10-Mar-09 22:27
mvePete O'Hanlon10-Mar-09 22:27 
AnswerRe: UML Software Pin
User 171649210-Mar-09 22:46
professionalUser 171649210-Mar-09 22:46 
QuestionRe: UML Software Pin
Brendan Vogt11-Mar-09 23:44
Brendan Vogt11-Mar-09 23:44 
AnswerRe: UML Software Pin
Pete O'Hanlon12-Mar-09 0:10
mvePete O'Hanlon12-Mar-09 0:10 
AnswerRe: UML Software Pin
User 171649212-Mar-09 0:26
professionalUser 171649212-Mar-09 0:26 
AnswerRe: UML Software Pin
shakhtyor12-Mar-09 10:51
shakhtyor12-Mar-09 10:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.