class MarketPrice:
def __init__(self):
self.is_constant = False
self.value = 1000
\(\text{Amount of Food} = \frac{\text{Food Available}}{\text{Number of Chickens}}\)
\(\text{Food Available} = \text{Market Price } \times 0.1\)
So the Market Price
indirectly determines the Amount of Food
class FoodAvailable:
def __init__(self): self.is_constant = False
def compute(self):
return MarketPrice().value * 0.1
class NumberOfChickens:
def __init__(self):
self.is_constant = True
self.value = 5
class AmountOfFood:
def __init__(self): self.is_constant = False
def compute(self):
return FoodAvailable().compute() / NumberOfChickens().value
Suppose as bellow
AmountOfFood().compute()
20.0