class Car(object):
# 定義車的方法
def move(self):
print('---車在移動---')
def stop(self):
print('---停車---')
# 定義一個銷售車的店類
class CarStore(object):
def order(self):
car = Car() # 找一輛車
return car
# 1.先得有個銷售汽車的店鋪
car_store = CarStore()
# car_store.order().move()
# 2.通過這家店訂車
my_car = car_store.order()
# 3.開車爽
my_car.move()
my_car.stop()