-----------------------------------------------------------
while (baby.isCrying())
{
baby.Burp();
if (!baby.isCrying())
{
output("your baby had gas");
exit;
}
if (baby.needsDiaperChange())
baby.changeDiaper();
if (!baby.isCrying())
{
output("your baby needed a change");
exit;
}
baby.Cuddle();
if (!baby.isCrying())
{
output("your baby needed a cuddle");
exit;
}
baby.Feed();
if (!baby.isCrying())
{
output("your baby was hungry");
exit;
}
baby.holdAndRockGently();
if (baby.isSleeping())
{
output("your baby was tired");
exit;
}
}