from restaurant import Restaurant, IceCreamStand
#flavors = ['Vainilla', 'Strawberry','apple','banana','grapes']
italian_restaurant = Restaurant('Mamma mia', 'Italian')
italian_restaurant.describe_restaurant()

ice_restaurant = IceCreamStand('Freedo', 'Ice Cream Store')
ice_restaurant.set_flavors('Vanilla', 'banana split', 'pistache', 'nutella')
ice_restaurant.describe_restaurant()
ice_restaurant.get_flavors()
Пример #2
0
from restaurant import Restaurant, IceCreamStand

restaurant = Restaurant("Seventh Taste", "Veggie")
restaurant.describe_restaurant()
restaurant.set_number_served(345)
restaurant.increment_number_served(15)

# Make an instance of the subclass. Inherited from the parent class.
my_ice_cream = IceCreamStand("Straciatella", "Ice-cream")
my_ice_cream.describe_restaurant()
my_ice_cream.get_flavors()