Exemplo n.º 1
0
from restaurant import Restaurant, IceCreamStand
my_own_restaurant = Restaurant('abc', 'H')
my_own_restaurant.describe_restaurant()

my_own_restaurant.set_number_served(23)
my_own_restaurant.get_number_served()

fla1 = ['strawberry', 'milk', 'choclate', 'vanilla']
fla2 = ['strawberry', 'milk', 'choclate', 'seasalt']

ice1 = IceCreamStand('1', 'icecream', fla1)
ice2 = IceCreamStand('2', 'icecream', fla2)

ice1.describe_icecream()
ice2.describe_icecream()
Exemplo n.º 2
0
from restaurant import Restaurant

r1 = Restaurant("BestRestaurant", "Chinese food")
r1.set_number_served(10)
print("The number of people the restaurant served is:" + str(r1.number_served))
r1.increment_number_served(20)
print("There are " + str(r1.number_served) + " people have been served.")

from restaurant import IceCreamStand

Icecream1 = IceCreamStand("LittleGirl", "dessert")
Icecream2 = IceCreamStand("MyFavorite", "dessert")
Icecream1.describe_restaurant()
Icecream1.set_flavors(['orange', 'apple', 'banana'])
Icecream1.describe_icecream()
Icecream2.describe_restaurant()
Icecream2.set_flavors(['strawberry', 'blue berry', 'melon'])
Icecream2.describe_icecream()