{"id":1008,"date":"2023-09-08T09:48:35","date_gmt":"2023-09-08T07:48:35","guid":{"rendered":"https:\/\/oopm.org\/?page_id=1008"},"modified":"2025-01-14T13:52:06","modified_gmt":"2025-01-14T12:52:06","slug":"5-x-attempt-on-a-subclass-chapter","status":"publish","type":"page","link":"https:\/\/oopm.org\/?page_id=1008","title":{"rendered":"8. Subclasses and submethods"},"content":{"rendered":"<div class=\"pdfprnt-buttons pdfprnt-buttons-page pdfprnt-top-right\"><a href=\"https:\/\/oopm.org\/index.php?rest_route=wpv2pages1008&print=pdf\" class=\"pdfprnt-button pdfprnt-button-pdf\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-print\/images\/pdf.png\" alt=\"image_pdf\" title=\"View PDF\" \/><\/a><a href=\"https:\/\/oopm.org\/index.php?rest_route=wpv2pages1008&print=print\" class=\"pdfprnt-button pdfprnt-button-print\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-print\/images\/print.png\" alt=\"image_print\" title=\"Print Content\" \/><\/a><\/div>\n<p class=\"wp-block-paragraph\">In the previous chapters, we have seen an example of a how to represent the concept of a bank account by means of a class. Most banks have different kinds of accounts like saving accounts, credit accounts, retirement accounts, and business accounts. Such accounts have different properties, but also a number of properties in common. A credit account may e.g. have a property <em>maximum credi<\/em>t whereas all accounts have a property <em>balance<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this section, we will show how to represent different kinds of bank accounts by means of classes organised in a hierarchy. For this purpose, we introduce in section <script>mkRef(\"Subclasses\")<\/script> a language mechanism called <em>subclass<\/em>. In section <script>mkRef(\"Submethods\")<\/script>, we will introduce a similar mechanism for methods called <em>submethod<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n<div style=\"display:flex; gap:10px;justify-content:center\" class=\"wps-pgfw-pdf-generate-icon__wrapper-frontend\">\n\t\t<a  href=\"https:\/\/oopm.org?action=genpdf&amp;id=1008\" class=\"pgfw-single-pdf-download-button\" ><img src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-generator-for-wp\/admin\/src\/images\/PDF_Tray.svg\" title=\"Generate PDF\" style=\"width:auto; height:45px;\"><\/a>\n\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>In the previous chapters, we have seen an example of a how to represent the concept of a bank account by means of a class. Most banks have different kinds of accounts like saving accounts, credit accounts, retirement accounts, and business accounts. Such accounts have different properties, but also a number of properties in common. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":21,"menu_order":8,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1008","page","type-page","status-publish","hentry"],"mb":[],"mfb_rest_fields":["title","gutenberg_elementor_mode"],"_links":{"self":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/1008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1008"}],"version-history":[{"count":72,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/1008\/revisions"}],"predecessor-version":[{"id":11121,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/1008\/revisions\/11121"}],"up":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/21"}],"wp:attachment":[{"href":"https:\/\/oopm.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}