In an application design training I attended the past week, an instructor said that using deep inheritance is not a really good design principle since it increases the object size as you go further down the inheritance hierarchy. While I'm skeptical because this is the first time I heard about this (and haven't read it elsewhere), I wanna verify with you guys if this is true? Thanks! [ October 14, 2006: Message edited by: Val Pecaoco ]
"Knowledge is power, but enthusiasm is the key." -- Lavern Barn
If A extends B, then B's size will be (more or less) the standard object size overhead, plus the size of A's instance members, plus the size of B's instance members. If C then extends B, a C object adds the size of C's data members. That's all, but of course this shouldn't surprise you at all!
If your instructor really said this... well, that's a pretty silly statement.