# 就餐人数
class Restaurant():
def __init__(self, restaurant_name, cuisine_type):
self.restaurant_name = restaurant_name
self.cuisine_type = cuisine_type
self.number_served = 0
def describe_restaurant(self):
print(self.restaurant_name + " " + self.cuisine_type)
def open_restaurant(self):
print("The restaurant is open now!")
def number_restaurant(self):
print("There are " + str(self.number_served) + " people.")
def set_number_served(self, num):
self.number_served = num
def increment_number_served(self, num):
self.number_served += num
my = Restaurant('zxx', 'china')
my.number_restaurant()
my.number_served = 23
my.number_restaurant()
my.set_number_served(25)
my.number_restaurant()
my.increment_number_served(10)
my.number_restaurant()