{"id":3008,"date":"2016-05-11T00:00:29","date_gmt":"2016-05-11T00:00:29","guid":{"rendered":"https:\/\/assignment.essayshark.com\/blog\/?p=3008"},"modified":"2023-01-10T07:48:47","modified_gmt":"2023-01-10T07:48:47","slug":"design-patterns-assignment-sample","status":"publish","type":"post","link":"https:\/\/assignmentshark.com\/blog\/design-patterns-assignment-sample\/","title":{"rendered":"Design Patterns Assignment Sample"},"content":{"rendered":"<h2>DESIGN PATTERNS TASK:<\/h2>\n<p>Describe the following software design pattern: Abstract Factory<\/p>\n<h2>SOLUTION:<\/h2>\n<p>In this sample we will provide a description of Abstract Factory software design pattern. First of all, it deals with objects know as \u201cfactories\u201d, which is (in terms of object-oriented programming) an object used for creating other objects.<!--more--><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/05\/image001.png\" rel=\"attachment wp-att-3014\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3014\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/05\/image001.png\" alt=\"Abstract Factory \" width=\"383\" height=\"146\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/05\/image001.png 383w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/05\/image001-300x114.png 300w\" sizes=\"auto, (max-width: 383px) 100vw, 383px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>What Abstract Factory pattern does is: providing an encapsulation to a group of individual factory objects. The classes of such factory objects would not be specified (hence Abstract), but they must still have something in common in order to justify being encapsulated together. This construction typically allows the user to create concrete objects for his own needs by using generic interface provided by Abstract Factory.<\/p>\n<p>Once everything is set, the user (which may happen to not be the initial author of the code, but rather the client) may care little about what&#8217;s inside the initial Abstract Factory class, which ones of internal factory objects are used, and how everything works in the first place. In other words, client&#8217;s code is insulated from Abstract Factory code and object creation process.<\/p>\n<p>In this class diagram, we can see that the client refers to a pair of interfaces called GUIFactory and Button, forcing the Abstract Factory to use appropriate concrete factories (encapsulated inside Abstract Factory) in order to create concrete objects (WinButton or OSXButton respectively), to which Abstract Factor returns abstract pointers the client can use to access them.<\/p>\n<p><a href=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/05\/image003.png\" rel=\"attachment wp-att-3016\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3016\" src=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/05\/image003.png\" alt=\"GUIFactory and Button\" width=\"521\" height=\"371\" srcset=\"https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/05\/image003.png 521w, https:\/\/assignmentshark.com\/blog\/wp-content\/uploads\/2016\/05\/image003-300x214.png 300w\" sizes=\"auto, (max-width: 521px) 100vw, 521px\" \/><\/a><\/p>\n<h2>Homework Assignments Help from Experienced Experts<\/h2>\n<blockquote><p><em>The design patterns assignment sample was completed by one of AssignmentShark experts. If you have any questions, or need your similar project to be completed, contact us for <a href=\"https:\/\/assignmentshark.com\/\" target=\"_blank\" rel=\"noopener\">assignment help<\/a> in any convenient way for you. <\/em><\/p>\n<p><em>Our experts offer math, engineering, chemistry, programming, <a href=\"https:\/\/assignmentshark.com\/accounting-homework-help.html\" target=\"_blank\" rel=\"noopener\">college accounting homework help<\/a> and other types of assignments for you.<\/em><\/p>\n<p><em>Any time, any difficulty level, any discipline!<\/em><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>DESIGN PATTERNS TASK: Describe the following software design pattern: Abstract Factory SOLUTION: In this sample we will provide a description of Abstract Factory software design pattern. First of all, it deals with objects know as \u201cfactories\u201d, which is (in terms of object-oriented programming) an object used for creating other objects.<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53,35],"tags":[],"class_list":["post-3008","post","type-post","status-publish","format-standard","hentry","category-it","category-samples"],"_links":{"self":[{"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/posts\/3008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/comments?post=3008"}],"version-history":[{"count":10,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/posts\/3008\/revisions"}],"predecessor-version":[{"id":13579,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/posts\/3008\/revisions\/13579"}],"wp:attachment":[{"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/media?parent=3008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/categories?post=3008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/assignmentshark.com\/blog\/wp-json\/wp\/v2\/tags?post=3008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}