Private string tle int year book string tle

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ight of Derived Classes Type of Inheritance Access Control for Members Base Class private protected public private protected public private private protected protected protected public class Book{ public: …. private: string /tle; int year; } Book  ­string /tle  ­int year IS ­A AudioBook  ­double length class AudioBook : public Book{ public: …. private: double length; } Execu/on Order of Derived Class Constructor & Destructor •  Alloca/ng space for the •  When an object is en/re object to store base destroyed (goes out of class plus derived class’s scope or is deleted) the members. derived class's destructor is called on the object •  Calling the base class's first; constructor to ini/alize the base ­class members. •  Then the base class's destructor is called on th...
View Full Document

Ask a homework question - tutors are online