italiano

 avatar
user_6738772
python
2 years ago
1.7 kB
2
Indexable
Never
class ItalianFoodCulture():
    def __init__(self):
        self.name = ""
        self.cuisine = ""
        self.description = ""
        self.base_ingredients = ""
        self.sauce_ingredients = ""
        self.sp = " "
    
    def set_name(self, name):
        self.name = name

    def set_cuisine(self, cuisine):
        self.cuisine = cuisine
    
    def set_description(self, description):
        self.description = description

    def set_base_ingredients(self, ingredients):
        self.base_ingredients = ingredients

    def set_sauce_ingredients(self, ingredients):
        self.sauce_ingredients = ingredients

    def get_name(self):
        return self.name

    def get_cuisine(self):
        return self.cuisine

    def get_description(self):
        return self.description

    def get_base_ingredients(self):
        return self.base_ingredients

    def get_sauce_ingredients(self):
        return self.sauce_ingredients


    def __str__(self):
        return str(self.name) + str(self.sp) +str(self.cuisine) + str(self.sp) +str(self.description) + str(self.sp) + str(self.base_ingredients) + str(self.sauce_ingredients) 

    def __eq__(self, culture):
        if self.name == culture.name and self.cuisine == culture.cuisine and self.description == culture.description and self.base_ingredients == culture.base_ingredients and self.sauce_ingredients == culture.sauce_ingredients:
            return True
        else:
            return False

    def __repr__(self):
        rep = 'FoodCulture(' + str(self.name) + ',' + str(self.cuisine) + ',' + str(self.description) + ',' + str(self.base_ingredients) + str(self.sauce_ingredients) + ')'
        return rep