facade pattern sale finalize(invoicesale generate_receipt(invoicepayment_typeas you can seenot lot has changed the code for sales results in single entry point to the more complex business system we now have limited set of functions to call via the facade that allows us to interact with the parts of the system we need access towithout overburdening us with all the internals of the system we also have single class to interact withso we no longer have to go digging through the whole class diagram to find the correct place to hook into the system in the sub-systema third-party stock-management system or loyalty program could replace internal systems without having the clients using the facade class change single line of code our code is thus more loosely coupled and easier to extend the pos clients do not care if we decide to hand off the stock and accounting to third-party provider or build and run an internal system the simplified interface remains blissfully unaware of the complexity under the hood without reducing the power inherent in the sub-system arting shots there is not much to the facade pattern you start out by feeling the frustration of subsystem or group of sub-systems that does not work the way you want it toor you find yourself having to look up interactions in many classes by nowyou know something is not rightso you decide to clean up this messor at least hide it behind singleelegant interface you design your wrapper class to turn the ugly sub-system into black box that deals with the interactions and complexities for you the rest of your codeand other potential client codeonly deals with this facade the world is now just tiny bit better for your efforts--well done exercises facades are often implemented as singletons when they do not have to keep track of state alter the facade implementation in the last section of code so it uses the singleton pattern from expand the point of sale system outlined in this until you have system that you could use in the real world pick your favorite social media platform and create your own facade that allows you to interact with their api