This is prepare_meal, written in java