opinion on abstract classes

Started by
2 comments, last by romanMagyar 20 years, 4 months ago
Just wondering, would it be considered bad OOP if implementation code is placed into an abstract class?
Advertisement
An abstract class is not an interface, so no.
You can but then you have to deal with the coupling to the derivitives. You also would have to deal with multiple inheritance woes which are pretty hard to grok. If you provide default implementation you might get unwanted behavior later on. Let compiler catch this. Though, in the end it''s up to you.
Implementation code can most certainly be placed in an abstract class in OOP. As long as behavior which users may want to override is in virtual functions, there''s no problem with it. In fact, a few design patterns require this.

"Sneftel is correct, if rather vulgar." --Flarelocke

This topic is closed to new replies.

Advertisement