Beispiel #1
0
from restaurants import Restaurant

my_restaurant = Restaurant('nice', 'stake')
my_restaurant.describe_restaurant()
Beispiel #2
0
from restaurants import Restaurant

new_restaurant = Restaurant('OCharleys', 'southern')
new_restaurant.describe_restaurant()
new_restaurant.open_restaurant()
new_restaurant.increment_number_served(5)
new_restaurant.describe_restaurant()
Beispiel #3
0
from restaurants import Restaurant

restaurant = Restaurant('KF', 'fast food')
restaurant.describe_restaurant()
Beispiel #4
0
from restaurants import Restaurant  # 导入模块和类

my_like = Restaurant('神厨', '珍珠翡翠白玉汤')
my_like.describe_restaurant()
Beispiel #5
0
# 9-10 Imported Restaurant
from restaurants import Restaurant

food = Restaurant('Pizza Land', 'pizza')

food.describe_restaurant()

# 9-11 Imported Admin
from users import Admin

tyson = Admin('tyson', 'nguyen', 'tysonnguyen', 22, 'oregon')
tyson.privileges.show_privileges()

# 9-12 Multiple Modules where User class in one module, and store the Privileges and Admin separately.
from user_privileges import Admin, Privileges

tyson = Admin('tyson', 'nguyen', 'tysonnguyen', 22, 'oregon')
tyson.privileges.show_privileges()