{"id":2891,"date":"2026-11-10T08:04:06","date_gmt":"2026-11-10T08:04:06","guid":{"rendered":"https:\/\/wiki.designcorner.co.ke\/?dc_term=polymorphism"},"modified":"2026-11-10T08:04:06","modified_gmt":"2026-11-10T08:04:06","slug":"polymorphism","status":"publish","type":"dc_term","link":"https:\/\/wiki.designcorner.co.ke\/?dc_term=polymorphism","title":{"rendered":"Polymorphism"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What it is<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In object-oriented programming, several classes can each respond to the same method name in their own way. The calling code does not need to know which class it is talking to.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why it matters for your business<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It keeps code shorter and easier to extend, which lowers maintenance cost on custom software.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Real-world example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A draw() command draws a circle for a Circle object and a rectangle for a Rectangle object.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Design Corner tip<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When commissioning custom software, ask the developer to reuse shared logic through classes rather than copying code.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>A programming idea where one command behaves differently depending on the kind of object it is used on.<\/p>\n","protected":false},"featured_media":0,"template":"","dc_letter":[21],"dc_topic":[34],"class_list":["post-2891","dc_term","type-dc_term","status-publish","hentry","dc_letter-p","dc_topic-software-and-development"],"_links":{"self":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term\/2891","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term"}],"about":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/types\/dc_term"}],"version-history":[{"count":0,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term\/2891\/revisions"}],"wp:attachment":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2891"}],"wp:term":[{"taxonomy":"dc_letter","embeddable":true,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fdc_letter&post=2891"},{"taxonomy":"dc_topic","embeddable":true,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fdc_topic&post=2891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}