Question: if ( numSalads < 6 ) { System.out.println ( Please purchase at least 6 . ) ; } else { / / Calculate
if numSalads
System.out.printlnPlease purchase at least ;
else
Calculate total cost if numSalads is greater than or equal to
totalCost numSalads ;
Check if totalCost is within budget
if totalCost myMoney
System.out.printlnSuccessful purchase!";
Check if at least one item was purchased
if myMoney
System.out.printlnAt least one item was purchased.";
Check if numSalads is greater than
if numSalads
System.out.printlnRestocking soon.";
else
System.out.printlnNot all salads purchased.";
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
