⧼⧼  Previous Page
⧼  Table of Contents  ⧽
Next Page  ⧽⧽

Virtual Methods

Computer Programming C++ / Object Oriented Programming

When working with inheritance, it's common to want to change how one type of object functions (called overriding). This video will show you how to do this.

Let's move over to Main, and test the methods we just wrote.

Review Questions

The following are examples of questions similar to what you can expect to see on the next exam.

Hover over a question to show the answer.
  1. What does making a method virtual do? Allows an inheriting class to override it.
  2. When should you make methods virtual? Always, unless you have a specific reason not to.
⧼⧼  Previous Page
⧼  Table of Contents  ⧽
Next Page  ⧽⧽
© Ryan Appel