ECE244H1 Chapter 15: ECE244 Ch15 Inheritance

56 views4 pages

Document Summary

Process by which a new class is created from another class. Allows programmers to enhance existing class without modifying code of these class. Has all the variables and functions as base class. Also has additional member functions and member variables. Ancestor class parent of a parent of a parent of another class. All public and private data members of base class. All public and private function members of base class. Private data and function members are not accessible in derived class. Constructors and destructors of base class (default is provided) (default copy constructor simply copies the contents of member variables and does not work correctly for classes with pointers or dynamic data in their member variables) Note: if your class member variables involved pointers, dynamic data, dynamic arrays, define a copy constructor apply to any class. New function members (private or public) (function with the same name overrides)

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents