from arrangements import Arrangement valentine = Arrangement("Valentine") mother = Arrangement("Mother's Day") alstro = Alstroemeria("Alstroemeria", "Long", "Green") print(alstro.name) alstro.bloom(10) valentine.enhance(alstro) baby = BabysBreath("Baby's Breath", "Short", "Blue") print(baby.name) baby.bloom(5) valentine.enhance(baby) daisy = Daisy("Daisy", "Medium", "Yellow") print(daisy.name) daisy.bloom(7) valentine.enhance(daisy) for flower in valentine.flowers: print(flower) mother.enhance(daisy) mother.enhance(alstro) for flower in mother.flowers: print(flower)
from arrangements import ValentinesDay from flowers import Rose from flowers import Daisy if __name__ == "__main__": for_beth = ValentinesDay() red_rose = Rose("red", 10, 10, False, 10) blue_rose = Rose("blue", 8, 12, False, 4) pink_rose = Rose("pink", 12, 8, False, 6) yellow_daisy = Daisy("yellow", 5, 4, True, 6) for_beth.enhance(red_rose) for_beth.enhance(blue_rose) for_beth.enhance(pink_rose) for_beth.enhance(yellow_daisy)
from arrangements import MothersDay, ValentinesDay from flowers import Alstroemeria, BabysBreath, Daisy, Lily, Poppy, Rose valentines_day_arrangement = ValentinesDay() mothers_day_arrangement = MothersDay() pink_rose = Rose("pink") red_rose = Rose("red") blue_rose = Rose("blue") poppy = Poppy() lily = Lily() daisy = Daisy() babys_breath = BabysBreath() alstroemeria = Alstroemeria() mothers_day_arrangement.enhance(daisy) mothers_day_arrangement.enhance(babys_breath) mothers_day_arrangement.enhance(poppy) # mothers_day_arrangement.enhance(pink_rose) valentines_day_arrangement.enhance(pink_rose) valentines_day_arrangement.enhance(red_rose) valentines_day_arrangement.enhance(blue_rose) valentines_day_arrangement.enhance(lily) valentines_day_arrangement.enhance(alstroemeria) # valentines_day_arrangement.enhance(poppy) print(mothers_day_arrangement) print(valentines_day_arrangement)
from arrangements import MothersDay, ValentinesDay from flowers import Rose, Daisy, Lily, Alstroemeria if __name__ == "__main__": for_beth = ValentinesDay() red_rose = Rose() ugly_daisy = Daisy() for_beth.enhance(red_rose) for_beth.enhance(ugly_daisy)