facade pattern invoice_line invoiceline(iteminvoice add_line(invoice_lineinvoice calculate(invoice save(loyalt_account loyaltyaccount fetch(customerloyalty_account calculate(invoiceloyalty_account save(receipt receipt(invoicepayment_typereceipt save(as you can seewhatever system is tasked with processing sale needs to interact with very large number of classes specific to the point of sale sub-system systems evolution systems evolve--that is fact of life--and as they grow they can become very complex to keep the whole system simplewe want to hide all the functionality from the client know you smelled it the moment you saw the preceding snippet everything is tightly coupledand we have large number of classes to interact with when we want to extend our pos with some new technology or functionalitywe will need to dig into the internals of the system we might just forget to update some small hidden piece of codeand our whole system will thus come crashing down we want to simplify this system without losing any of the system' power ideallywe want our transaction processor to look something like thisdef nice_sales_processor(customer_codeitem_dict_listpayment_type)invoice someinvoiceclass(customer_codefor item_dict in item_dict_listinvoice add_item(item_dict["barcode"]item_dict_list["amount_ purchased"]invoice finalize(invoice generate_receipt(payment_type