lucasandrade Posted January 4 Share Posted January 4 Sorveteria: Uma sorveteria é um tipo específico de restaurante. Escreva uma classe chamada IceCreamStand que herde da classe Restaurant . Adicione um atributo chamado flavors que armazene uma lista de sabores de sorvete. Escreva um método para mostrar esses sabores. Crie uma instância de IceCreamStand e chame esse método. class Restaurant(object): def __init__(self, restaurant_name, cuisine_type,num_cliente,lista_sabores): self.restaurant_name = restaurant_name self.cor = cuisine_type self.num_cliente = num_cliente+1 self.flavors = lista_sabores class IceCreamStand(Restaurant): def get_sabores(self,lista_sabores): IceCreamStand=self.flavors print(IceCreamStand) sabores = Restaurant('Apolo 12','Cozinha Mexicana',7,['morango','chocolate']) Link to comment Share on other sites More sharing options...
lucasandrade Posted January 4 Author Share Posted January 4 já consegui!.... obrigado! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now