class Shopper(object):
""" Model the client to order products from a factory """
def __init__(self):
self._products = []
def order(self, product_type):
self._products.append(ProductFactory.create_product(\
product_type))
def __str__(self):
sTmp=""
for p in self._products:
sTmp += "{}{}".format(p, os.linesep)
#
return sTmp