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

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.

主站蜘蛛池模板: 寻乌县| 盐津县| 阳原县| 梁平县| 汨罗市| 隆安县| 长治县| 浦县| 隆德县| 博野县| 惠安县| 蛟河市| 疏附县| 恩平市| 永平县| 株洲市| 芒康县| 云南省| 杨浦区| 广河县| 德化县| 定州市| 裕民县| 永仁县| 会宁县| 三都| 临颍县| 闸北区| 福泉市| 雷波县| 江油市| 青神县| 信丰县| 长子县| 旌德县| 苗栗市| 阳城县| 朝阳县| 宁城县| 汝阳县| 壶关县|