Inharitance Flashcards
What is inheritance
A derived class inherits the properties of bass class, object declared in the dried class had access to all public member functions of the base class
What is override
When a function of a derived class has the same name and parameters as the function in the base class. The derived class is overriding that function
What is protected access
Allows access to derived classes but no one else
What is polymorphism
Determining which program hebavioir depending on data type. There are two main types of polymorphism
What is compile-time polymorphism
Is when the compiler determines which function to call at a comple time
What is a runtime polymorphism
Is when the complirer is unable to determine which function to call at complie -time , so the determination is made while the program is running
What is a virtual function
Function that may be overridden in a derived class and used for runtime polymorphism
What is static binding
Happens at compile time. It’s the link between function and function definition call
What is dynamic binding
Link cannot be determined until runtime
What is a pure vital function
Provide no definition in the base class, must be overridden in the derived class
What is an abstract base class
A class that has one or more pure vital functions, objects off thus class cannot be declared
Has a
One class may have objects of other class and variable type ( no - inheritance)
Is a
One class ‘is a ‘ Ty-e of a bas4 class (inhatitance)