Join Ads Marketplace to earn through podcast sponsorships.
Manage your ads with dynamic ad insertion capability.
Monetize with Apple Podcasts Subscriptions via Podbean.
Earn rewards and recurring income from Fan Club membership.
Get the answers and support you need.
Resources and guides to launch, grow, and monetize podcast.
Stay updated with the latest podcasting tips and trends.
Check out our newest and recently released features!
Podcast interviews, best practices, and helpful tips.
The step-by-step guide to start your own podcast.
Create the best live podcast and engage your audience.
Tips on making the decision to monetize your podcast.
The best ways to get more eyes and ears on your podcast.
Everything you need to know about podcast advertising.
The ultimate guide to recording a podcast on your phone.
Steps to set up and use group recording in the Podbean app.
Join Ads Marketplace to earn through podcast sponsorships.
Manage your ads with dynamic ad insertion capability.
Monetize with Apple Podcasts Subscriptions via Podbean.
Earn rewards and recurring income from Fan Club membership.
Get the answers and support you need.
Resources and guides to launch, grow, and monetize podcast.
Stay updated with the latest podcasting tips and trends.
Check out our newest and recently released features!
Podcast interviews, best practices, and helpful tips.
The step-by-step guide to start your own podcast.
Create the best live podcast and engage your audience.
Tips on making the decision to monetize your podcast.
The best ways to get more eyes and ears on your podcast.
Everything you need to know about podcast advertising.
The ultimate guide to recording a podcast on your phone.
Steps to set up and use group recording in the Podbean app.
Inheritance - Polymorphism In A Hierarchical Manner
We switch gears in this episode and start to look at inheritance. This is a core feature of object-oriented design and the most recognizable attribute. Child classes are utilized through polymorphic support. Thus, we have a natural transition into this popular usage of object-oriented solutions.
A Lowest Common DenominatorWe have discussed the idea of building on methods where possible. When we do, we are creating a lowest common denominator approach to functionality. This is what makes a system logical in its design. Whenever a user (developer) uses a method or attribute there are certain things they can expect that are included.
For example, when I have "save" methods in classes, the user expects the class supports persistence. They also will expect a corresponding "load" is going to be available in that class. It is reasonable for the user to expect that a "save" followed by a "load" will result in the before/after instances being identical.
Extending Through InheritanceWe have the aforementioned set of expectations as developers. Those lead us to look at a hierarchy as something that grows as it goes. That means we should extend functionality as we inherit. We should avoid rewriting what the parent does. While we can change or even block behavior in child classes, that is rarely a good design. It is highly frustrating for a developer to have a method available to the parent that is no longer relative (rewritten or unavailable) further down the chain.
Think of each step in the hierarchy as a way to build on the parent features. The base class supplies a foundation. The child classes add to that foundation without impacting what has been built in the prior layers. This approach will help your hierarchy help the developers that use it.
Create your
podcast in
minutes
It is Free