Join Gerry O'Brien for an in-depth discussion in this video Exploring polymorphism, part of Learning C#.
Our third pillar of object oriented programming is known as polymorphism.…The term polymorphism essentially means many states or many forms…and to get an idea of how that functions within…our programming environment for the applications that we create, we'll…continue to look at the Animal class and the Dog class.…So, in this example, we have our Animal class…that we have been working on, that has specific attributes.…So, we have some member variables.…And we also have some functionality built into it.…Such as properties that allow us to encapsulate our age and our color.…
And then a couple of methods, such as Move and makeNoise.…Within our Dog class, we currently don't have…any implementation of methods or other properties in here.…But we are inheriting from the Animal class through this context.…And that means that the Dog class basically…takes on all properties of that Animal class.…But polymorphism allows us to make changes to our subclasses, which…allow them to provide additional…functionality or additional number of variables.…
- Installing C#
- Working with loops
- Controlling program flow
- Using variables
- Building functions
- Creating and instantiating classes
- Catching errors
- Managing resources with the garbage collector
- Building collections
Skill Level Beginner
1. Introducing C#
2. C# Language Elements
3. Object-Oriented Programming in C#
4. Structured Exception Handling
5. Resource Management in C#
6. Extensible Types in C#
7. Windows Apps in C#
- 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.