{"id":114545,"date":"2024-06-18T06:47:00","date_gmt":"2024-06-18T06:47:00","guid":{"rendered":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/"},"modified":"2024-06-18T06:47:00","modified_gmt":"2024-06-18T06:47:00","slug":"master-the-design-of-classes-part-5","status":"publish","type":"post","link":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/","title":{"rendered":"Master the Design of Classes (Part 5)"},"content":{"rendered":"<div class=\"youtubomatic-video-container\"><iframe loading=\"lazy\" width=\"580\" height=\"380\" src=\"https:\/\/www.youtube.com\/embed\/EjFOgAtQKYk?autoplay=1&#038;controls=1&#038;hl=en\" frameborder=\"0\" allowfullscreen><\/iframe><\/div>\n<p>Watch the full video: <a href=\"https:\/\/youtu.be\/jwCW446hoPk\" target=\"_blank\">https:\/\/youtu.be\/jwCW446hoPk<\/a><\/p>\n<p>Let me show you the hardest problem in object-oriented modeling, on an example.<br \/>\nThis interface is modeling a book edition as an abstract concept.<br \/>\nWe call that an open-ended model because it can attain infinitely many implementations over time.<br \/>\nThere can be an ordinal edition, such as the first, the second, and so on.<br \/>\nThere can be an annual edition, like the year 2024.<br \/>\nA seasonal edition and a monthly edition come to mind.<br \/>\nThe number of types implementing this interface is only bounded by your imagination.<br \/>\nThe long video demonstrates this design process.<br \/>\nI will only show you the impossible part of it, which sometimes appears in practice.<br \/>\nWhat if we needed to sort the book&#8217;s editions? Implementing the IComparable interface on such an open-ended type is impossible.<br \/>\nGive it a try, and tell me what you came up with.<\/p>\n<p>Become a sponsor to access source code \u25ba <a href=\"https:\/\/www.patreon.com\/zoranhorvat\" target=\"_blank\">https:\/\/www.patreon.com\/zoranhorvat<\/a><br \/>\nJoin Discord server with topics on C# \u25ba <a href=\"https:\/\/codinghelmet.com\/go\/discord\" target=\"_blank\">https:\/\/codinghelmet.com\/go\/discord<\/a><br \/>\nEnroll course *Beginning Object-Oriented Programming with C#* \u25ba <a href=\"https:\/\/codinghelmet.com\/go\/beginning-oop-with-csharp\" target=\"_blank\">https:\/\/codinghelmet.com\/go\/beginning-oop-with-csharp<\/a><br \/>\nSubscribe \u25ba <a href=\"https:\/\/www.youtube.com\/channel\/UCxsWfh8LCcn55mFB6zGBT1g?sub_confirmation=1\" target=\"_blank\">https:\/\/www.youtube.com\/channel\/UCxsWfh8LCcn55mFB6zGBT1g?sub_confirmation=1<\/a><br \/>\n\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac<br \/>\n\ud83d\udc68 About Me \ud83d\udc68<br \/>\nHi, I\u2019m Zoran, I have more than 20 years of experience as a software developer, architect, team lead, and more. I have been programming in C# since its inception in the early 2000s. Since 2017 I have started publishing professional video courses at Pluralsight and Udemy and by this point, there are over 100 hours of the highest-quality videos you can watch on those platforms. On my YouTube channel, you can find shorter video forms focused on clarifying practical issues in coding, design, and architecture of .NET applications.\u2764\ufe0f<br \/>\n\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac\u25ac<br \/>\n\u26a1\ufe0fCOPYRIGHT NOTICE:<br \/>\nThe Copyright Laws of the United States recognize a \u201cfair use\u201d of copyrighted content.  Section 107 of the U.S. Copyright Act states: \u201cNotwithstanding the provisions of sections 106 and 106A, the fair use of a copyrighted work, including such use by reproduction in copies or phono records or by any other means specified by that section, for purposes such as criticism, comment, news reporting, teaching (including multiple copies for classroom use), scholarship, or research, is not an infringement of copyright.&#8221; This video and our youtube channel, in general, may contain certain copyrighted works that were not specifically authorized to be used by the copyright holder(s), but which we believe in good faith are protected by federal law and the Fair use doctrine for one or more of the reasons noted above.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Watch the full video: https:\/\/youtu.be\/jwCW446hoPk Let me show you the hardest problem in object-oriented modeling, on an example. This interface is modeling a book edition as an abstract concept. We call that an open-ended model because it can attain infinitely many implementations over time. There can be an ordinal edition, such as the first, the second, and so on. There can be an annual edition, like the year 2024. A&#8230;<\/p>\n","protected":false},"author":1,"featured_media":114546,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-114545","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Master the Design of Classes (Part 5) - UshopWell.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Master the Design of Classes (Part 5) - UshopWell.com\" \/>\n<meta property=\"og:description\" content=\"Watch the full video: https:\/\/youtu.be\/jwCW446hoPk Let me show you the hardest problem in object-oriented modeling, on an example. This interface is modeling a book edition as an abstract concept. We call that an open-ended model because it can attain infinitely many implementations over time. There can be an ordinal edition, such as the first, the second, and so on. There can be an annual edition, like the year 2024. A...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/\" \/>\n<meta property=\"og:site_name\" content=\"UshopWell.com\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-18T06:47:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ushopwell.com\/ublog\/wp-content\/uploads\/2025\/05\/114545\/master-the-design-of-classes-part-5.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"480\" \/>\n\t<meta property=\"og:image:height\" content=\"360\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"UShopWell\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"UShopWell\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/master-the-design-of-classes-part-5\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/master-the-design-of-classes-part-5\\\/\"},\"author\":{\"name\":\"UShopWell\",\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/#\\\/schema\\\/person\\\/6fd1f9e0ff932e534c86c70d5acff0fc\"},\"headline\":\"Master the Design of Classes (Part 5)\",\"datePublished\":\"2024-06-18T06:47:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/master-the-design-of-classes-part-5\\\/\"},\"wordCount\":425,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/master-the-design-of-classes-part-5\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/114545\\\/master-the-design-of-classes-part-5.jpg\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/master-the-design-of-classes-part-5\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/master-the-design-of-classes-part-5\\\/\",\"url\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/master-the-design-of-classes-part-5\\\/\",\"name\":\"Master the Design of Classes (Part 5) - UshopWell.com\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/master-the-design-of-classes-part-5\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/master-the-design-of-classes-part-5\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/114545\\\/master-the-design-of-classes-part-5.jpg\",\"datePublished\":\"2024-06-18T06:47:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/master-the-design-of-classes-part-5\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/master-the-design-of-classes-part-5\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/master-the-design-of-classes-part-5\\\/#primaryimage\",\"url\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/114545\\\/master-the-design-of-classes-part-5.jpg\",\"contentUrl\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/114545\\\/master-the-design-of-classes-part-5.jpg\",\"width\":480,\"height\":360,\"caption\":\"Master the Design of Classes (Part 5)\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/master-the-design-of-classes-part-5\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Master the Design of Classes (Part 5)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/#website\",\"url\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/\",\"name\":\"UshopWell.com\",\"description\":\"The Premiere Online Marketplace\",\"publisher\":{\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/#organization\",\"name\":\"UshopWell\",\"url\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/wp-content\\\/uploads\\\/2018\\\/01\\\/pandaSwea.png\",\"contentUrl\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/wp-content\\\/uploads\\\/2018\\\/01\\\/pandaSwea.png\",\"width\":365,\"height\":359,\"caption\":\"UshopWell\"},\"image\":{\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/#\\\/schema\\\/person\\\/6fd1f9e0ff932e534c86c70d5acff0fc\",\"name\":\"UShopWell\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4adb372cadd43b4d4c57964dab95b0f69618bf960d131c4acf49d96d6bbc9c6e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4adb372cadd43b4d4c57964dab95b0f69618bf960d131c4acf49d96d6bbc9c6e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4adb372cadd43b4d4c57964dab95b0f69618bf960d131c4acf49d96d6bbc9c6e?s=96&d=mm&r=g\",\"caption\":\"UShopWell\"},\"url\":\"https:\\\/\\\/ushopwell.com\\\/ublog\\\/author\\\/kburnettu\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Master the Design of Classes (Part 5) - UshopWell.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/","og_locale":"en_US","og_type":"article","og_title":"Master the Design of Classes (Part 5) - UshopWell.com","og_description":"Watch the full video: https:\/\/youtu.be\/jwCW446hoPk Let me show you the hardest problem in object-oriented modeling, on an example. This interface is modeling a book edition as an abstract concept. We call that an open-ended model because it can attain infinitely many implementations over time. There can be an ordinal edition, such as the first, the second, and so on. There can be an annual edition, like the year 2024. A...","og_url":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/","og_site_name":"UshopWell.com","article_published_time":"2024-06-18T06:47:00+00:00","og_image":[{"width":480,"height":360,"url":"https:\/\/ushopwell.com\/ublog\/wp-content\/uploads\/2025\/05\/114545\/master-the-design-of-classes-part-5.jpg","type":"image\/jpeg"}],"author":"UShopWell","twitter_card":"summary_large_image","twitter_misc":{"Written by":"UShopWell","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/#article","isPartOf":{"@id":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/"},"author":{"name":"UShopWell","@id":"https:\/\/ushopwell.com\/ublog\/#\/schema\/person\/6fd1f9e0ff932e534c86c70d5acff0fc"},"headline":"Master the Design of Classes (Part 5)","datePublished":"2024-06-18T06:47:00+00:00","mainEntityOfPage":{"@id":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/"},"wordCount":425,"commentCount":0,"publisher":{"@id":"https:\/\/ushopwell.com\/ublog\/#organization"},"image":{"@id":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/#primaryimage"},"thumbnailUrl":"https:\/\/ushopwell.com\/ublog\/wp-content\/uploads\/2025\/05\/114545\/master-the-design-of-classes-part-5.jpg","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/","url":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/","name":"Master the Design of Classes (Part 5) - UshopWell.com","isPartOf":{"@id":"https:\/\/ushopwell.com\/ublog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/#primaryimage"},"image":{"@id":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/#primaryimage"},"thumbnailUrl":"https:\/\/ushopwell.com\/ublog\/wp-content\/uploads\/2025\/05\/114545\/master-the-design-of-classes-part-5.jpg","datePublished":"2024-06-18T06:47:00+00:00","breadcrumb":{"@id":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/#primaryimage","url":"https:\/\/ushopwell.com\/ublog\/wp-content\/uploads\/2025\/05\/114545\/master-the-design-of-classes-part-5.jpg","contentUrl":"https:\/\/ushopwell.com\/ublog\/wp-content\/uploads\/2025\/05\/114545\/master-the-design-of-classes-part-5.jpg","width":480,"height":360,"caption":"Master the Design of Classes (Part 5)"},{"@type":"BreadcrumbList","@id":"https:\/\/ushopwell.com\/ublog\/master-the-design-of-classes-part-5\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ushopwell.com\/ublog\/"},{"@type":"ListItem","position":2,"name":"Master the Design of Classes (Part 5)"}]},{"@type":"WebSite","@id":"https:\/\/ushopwell.com\/ublog\/#website","url":"https:\/\/ushopwell.com\/ublog\/","name":"UshopWell.com","description":"The Premiere Online Marketplace","publisher":{"@id":"https:\/\/ushopwell.com\/ublog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ushopwell.com\/ublog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ushopwell.com\/ublog\/#organization","name":"UshopWell","url":"https:\/\/ushopwell.com\/ublog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ushopwell.com\/ublog\/#\/schema\/logo\/image\/","url":"https:\/\/ushopwell.com\/ublog\/wp-content\/uploads\/2018\/01\/pandaSwea.png","contentUrl":"https:\/\/ushopwell.com\/ublog\/wp-content\/uploads\/2018\/01\/pandaSwea.png","width":365,"height":359,"caption":"UshopWell"},"image":{"@id":"https:\/\/ushopwell.com\/ublog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/ushopwell.com\/ublog\/#\/schema\/person\/6fd1f9e0ff932e534c86c70d5acff0fc","name":"UShopWell","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4adb372cadd43b4d4c57964dab95b0f69618bf960d131c4acf49d96d6bbc9c6e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4adb372cadd43b4d4c57964dab95b0f69618bf960d131c4acf49d96d6bbc9c6e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4adb372cadd43b4d4c57964dab95b0f69618bf960d131c4acf49d96d6bbc9c6e?s=96&d=mm&r=g","caption":"UShopWell"},"url":"https:\/\/ushopwell.com\/ublog\/author\/kburnettu\/"}]}},"_links":{"self":[{"href":"https:\/\/ushopwell.com\/ublog\/wp-json\/wp\/v2\/posts\/114545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ushopwell.com\/ublog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ushopwell.com\/ublog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ushopwell.com\/ublog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ushopwell.com\/ublog\/wp-json\/wp\/v2\/comments?post=114545"}],"version-history":[{"count":0,"href":"https:\/\/ushopwell.com\/ublog\/wp-json\/wp\/v2\/posts\/114545\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ushopwell.com\/ublog\/wp-json\/wp\/v2\/media\/114546"}],"wp:attachment":[{"href":"https:\/\/ushopwell.com\/ublog\/wp-json\/wp\/v2\/media?parent=114545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ushopwell.com\/ublog\/wp-json\/wp\/v2\/categories?post=114545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ushopwell.com\/ublog\/wp-json\/wp\/v2\/tags?post=114545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}