官术网_书友最值得收藏!

Implementing polymorphism

Polymorphism is a concept that is quite easy to grasp once you have looked at and understood the other pillars of OOP. Polymorphism literally means that something can have many forms. This means that from a single interface, you can create multiple implementations thereof.

There are two subsections to this, namely, static and dynamic polymorphism. With static polymorphism, you are dealing with the overloading of methods and functions. You can use the same method, but perform many different tasks.

With dynamic polymorphism, you are dealing with the creation and implementation of abstract classes. These abstract classes act as a blueprint that tells you what a derived class should implement. The following section looks at both.

主站蜘蛛池模板: 黎平县| 冷水江市| 正宁县| 额济纳旗| 潞城市| 诏安县| 霍邱县| 太保市| 长寿区| 永修县| 呼玛县| 新和县| 周口市| 明星| 安顺市| 古田县| 麻江县| 通渭县| 环江| 息烽县| 灵璧县| 旬阳县| 通道| 延津县| 松阳县| 灵山县| 高阳县| 黄山市| 兖州市| 嘉鱼县| 元阳县| 大英县| 辰溪县| 马公市| 天津市| 民县| 会宁县| 兴仁县| 巫溪县| 惠来县| 遂平县|