Chapter 8. Detecting and Correcting Improper Inheritance

    FAQ 8.01 Can improper inheritance wreck a project?

    FAQ 8.02 What's the best way to learn how to avoid improper inheritance?

    FAQ 8.03 Is intuition a reliable guide to understanding proper inheritance?

    FAQ 8.04 Is an Ostrich a kind-of Bird?

    FAQ 8.05 Should an overridden virtual function throw an exception?

    FAQ 8.06 Can an overridden virtual function be a no-op?

    FAQ 8.07 Why does C++ make it so hard to fix the Ostrich/Bird dilemma?

    FAQ 8.08 Should Circle inherit from Ellipse?

    FAQ 8.09 What can be done about the asymmetric-circle dilemma?

    FAQ 8.10 What is the one issue in these FAQs that doesn't seem to die?

    FAQ 8.11 Should Stack inherit from List?

    FAQ 8.12 Is code reuse the main purpose of inheritance?

    FAQ 8.13 Is container-of-thing a kind-of container-of-anything?

    FAQ 8.14 Is bag-of-apple a kind-of bag-of-fruit, assuming bag-of-fruit allows the insertion of any kind-of fruit?

    FAQ 8.15 Is parking-lot-for-cars a kind-of parking-lot-for-arbitrary-vehicles (assuming parking-lot-for-vehicles allows parking any kind-of vehicle)?

    FAQ 8.16 Is array-of Derived a kind-of array-of Base?

    FAQ 8.17 Does the fact that an array-of Derived can be passed as an array-of Base mean that arrays are bad?



C++ FAQs
C Programming FAQs: Frequently Asked Questions
ISBN: 0201845199
EAN: 2147483647
Year: 2005
Pages: 566
Authors: Steve Summit

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net