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

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.

主站蜘蛛池模板: 日照市| 原平市| 内乡县| 东安县| 鹤岗市| 原阳县| 隆昌县| 称多县| 阳东县| 天镇县| 广元市| 仁寿县| 师宗县| 盐边县| 定日县| 吴忠市| 锦屏县| 遵义市| 红安县| 诸暨市| 当阳市| 九台市| 张北县| 小金县| 饶平县| 茶陵县| 固镇县| 兰西县| 江城| 司法| 景泰县| 武川县| 甘德县| 上栗县| 永泰县| 丘北县| 昂仁县| 栾川县| 灌云县| 庆城县| 衡东县|