Introduction to C++

Dynamic Binding
and User Defined Type Conversions

Lectures #7, 8

Static Binding

Static Binding

Static Binding

Static Binding

Static Binding

Static Binding

Upcasting

Upcasting

Upcasting

Upcasting w/ Static Binding

Dynamic Binding

Overriding...What is it?

Overriding...What is it?

Overriding...What is it?

Overriding...4 Requirements

Overriding vs. Overloading

Overriding vs. Hiding

Syntax of Virtual Functions

Enabling Dynamic Binding

Rules of Dynamic Binding

But...back to static binding if...

Now, Using Dynamic Binding

"The simple syntactic change of..."

"Dynamic binding allows a heterogeneous..."

Example of Dynamic Binding

"Dynamic binding delays until run..."

"When a member function is..."

Slide 30

"This cost is not as..."

"Once dynamic binding is enabled"

"We can force application programs..."

Use of Protected...

"Dynamic binding can be used..."

"In order to implement a..."

Virtual Helper Functions

Virtual Helper Functions

"Whenever we have virtual functions"

"When using virtual inheritance,"

"A class derived from two..."

"Run Time"

"Run Time Type Identification (..."

"A downcast operation is when..."

"The dynamic_cast operator relies..."

Example of a Dynamic Cast

"The typeid operator relies on..."

Run Time Type Identification

"The dynamic_cast operator is..."

"Abstract"

"An abstract class is a..."

"The purpose of declaring a..."

"User"

"Implicit conversions occur when mixed..."

"To determine if a user..."

"Explicit conversions occur when the..."

"Constructors taking a single argument..."

"Remember,"

"If we do not want..."

"A conversion function allows us..."

"Notice that this conversion function..."

"Notice that this conversion function..."

"In order for the conversion..."

"With constructors as conversion functions..."

"Type conversions will not help..."