home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_12 / 731.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-12  |  696KB  |  2550x3300
Labels: book | poster | reckoner
OCR: C++ and OOP Inheritance 731 A look ahead Proper Public Inheritance To use public inheritance properly, there are two rules to follow. Both deal with Note Note the services derived or class member with an functions overridden provided member by the base function class The that rules are are also provided by Make sure that the requirements stated by the precondition are no stronger for the derived class function than for the base class function Make sure that the promises stated by the post tcondition are no weaker for the object derived class function than for the base class function The reasons for this rule will not be clear until more is understood about inherit- ance aad virtual functions. These topics will not be covered this introductory chapter, but it is worthwhile to start thinking ...