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

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.

主站蜘蛛池模板: 论坛| 灵石县| 苍溪县| 三门峡市| 福清市| 赫章县| 隆化县| 阿城市| 新乡市| 吉隆县| 聂拉木县| 偏关县| 阿巴嘎旗| 大丰市| 旌德县| 马龙县| 淮南市| 房产| 开鲁县| 石河子市| 柳河县| 万全县| 通海县| 乌拉特中旗| 万源市| 玉树县| 泾川县| 都昌县| 金沙县| 邵阳市| 乐亭县| 长兴县| 宜宾市| 孟津县| 仁怀市| 灯塔市| 休宁县| 车致| 南岸区| 大厂| 紫阳县|