How it works...

Polymorphism is something you will easily be using already by simply applying good object-oriented principles to the design of your classes. With the abstract Shuttle class, we saw that the class took on the shape of the NasaShuttle class and the RoscosmosShuttle class when it was used to derive those new classes from its abstraction. The constructor of the NasaShuttle class was then overridden to provide the same method name, but implemented using different signatures.

This is at the heart of polymorphism. Most likely, you have been using it without knowing about it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.104.242