Esempio n. 1
0
def main():
    aquarium = Aquarium()
    fish = Tang("Bubble", 3, "grey", False)
    fish2 = Clownfish("Nemo", 4, "red", "blue")
    fish3 = Kong("Sirilla", 5, "azure")
    fish4 = Kong("Moby", 11, "green")

    fish.feed()
    fish2.feed()
    fish3.feed()

    fish.status()
    fish2.status()
    fish3.status()
    fish4.status()

    aquarium.add_fish(fish)
    aquarium.add_fish(fish2)
    aquarium.add_fish(fish3)
    aquarium.feed()
    aquarium.remove_fish()
    aquarium.get_status()
Esempio n. 2
0
from fish import Fish
from fish import Tang
from fish import Kong
from fish import Clownfish
from aquarium import Aquarium

a = Tang("Annácska", 3, "pink", True)
b = Kong("Benike", 9, "red")
c = Clownfish("Ceci", 2, "blue", "yellow")
d = Kong("Dögike", 12, "white")
e = Tang("Viktor", 6, "orange", False)
a.status()
a.feed()
a.status()

q = Aquarium()
q.add_fish(a)
q.add_fish(b)
q.add_fish(c)
q.add_fish(d)
q.add_fish(e)

q.get_status()
q.feed()
q.get_status()
q.remove_fish()
q.get_status()