Ejemplo n.º 1
0
class PizzaShop:
    def __init__(self):
        self.server = Server('Pat')
        self.chef = PizzaRobot('Bob')
        self.oven = Oven()

    def order(self, name):
        customer = Customer(name)
        customer.order(self.server)
        self.chef.work()
        self.oven.bake()
        customer.pay(self.server)
Ejemplo n.º 2
0
 def __init__(self):
     self.server = Server('Pat')
     self.chef = PizzaRobot('Bob')
     self.oven = Oven()