facade pattern this makes the code much cleaner and easier to read simple rule of thumb in object-oriented programming is that whenever you encounter an ugly or messy systemhide it in an object you can imagine that this problem of complex or ugly systems is one that regularly comes up in the life of programmerso you can be certain that there are several opinions on how to best solve this issue one such the solution is to use design pattern called the facade pattern this pattern is specifically used to create complexity-limiting interface to sub-system or collection of sub-systems look at the following piece of code to get better feel for how this abstraction via the facade pattern should happen simple_ facade py class invoicedef __init__(selfcustomer)pass class customeraltered customer class to try to fetch customer on init or creates new one def __init__(selfcustomer_id)pass class itemaltered item class to try to fetch an item on init or creates new one def __init__(selfitem_barcode)pass class facade@staticmethod def make_invoice(customer)return invoice(customer@staticmethod def make_customer(customer_id)return customer(customer_id@staticmethod def make_item(item_barcode)return item(item_barcodebefore you read ontry to implement facade pattern for the pos system on your own