Join Peggy Fisher for an in-depth discussion in this video Inheritance, part of Up and Running with C++.
…The term inheritance, in programming, allows one class to…be created based on the definition of another class.…The new class inherits all the instance data and functions…from the base class, except for any constructors or destructors.…There are numerous real-life examples of this concept.…For example, we might identify a bug.…Which describes a wide range of creatures.…Bugs include ladybugs, grasshoppers, and ants.…They all have some common characteristics, but then…each one has additional features specific just to them.…A grasshopper can hop.…A ladybug can fly.…
When this type of relationship exists, we can say that the ladybug is a bug.…Grasshopper is a bug.…And ant is a bug.…This is the generic form of inheritance.…Another example might be, a poodle is a dog.…Or a car is a vehicle.…A circle is a shape.…The key here is the two words is-a.…This means that the specialized class had all the characteristics of…the general class, but it also has more that make it unique.…Let's consider our house class.…
Our house class currently defines a very generic house.…
- Downloading and exploring the C++ IDE
- Working with loops
- Using predefined functions
- Creating custom functions
- Creating and instantiating classes
- Working with external files
Skill Level Beginner
1. Getting Started
2. C++ Basics
3. Flow of Control
4. Classes and Objects
5. Data Structures
6. File Manipulation
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.