Computer Science 1037A/B Lecture Notes - Lecture 32: Enumerated Type, Multiple Inheritance
Document Summary
Practice of passing on property, titles, liabilities etc. from one to the other. For classes, it will be member variables, member functions etc. Inheritance: way of creating a new class by starting with an existing class and adding new members. The new class can replace or extend the functionality of the existing class. When an object (instance of new class) is a specialized version of one object (instance of existing class) The specialized object has all of the characteristics of the general object, plus additional characteristics that make it special. // derived class class derived : public base. Parent class class parent public: int a; void bf(); Child class class child : public parent int c; void df(); int a; void bf(); int c; void df(); #include using namespace std; inheritance. h enum discipline { archeology, biology, computer_science }; enum classification { freshman, sophomore, junior, senior }; class person private: string name; public: