This is a class design question in python.
I am trying to design three classes, one for animal, one for zoo, one for chicken farm.
class Animal:
pass
class Zoo:
def __init__(self, listOfAnimals)
.....
class chickenFarm(Zoo):
....
Note ChickenFarm is a child of Zoo and uses many of the zoo methods. Additionally, the chicken farm has its unique methods related only to chicken.
My question is, how the zoo class (or object) mutates into a chickenFarm object once all the animals in the zoo are found to be chicken? (Obviously the zoo class has methods that can add or remove animals)
in other words:
z=Zoo()
z.addAnimals()
z.removeanimals()
if z.testAllCkichen():
z now mutates into a chickenFarm objects
z.layEggs()
or maybe:
c=checkenFarm(z) # (when z now contains all chicken)
c.layEggs(0)