Logic implementation for Bottle Filling Application