A farmer needs to transport a wolf, a rabit, and a bundle of cabbage across a river.
However, he cannot carry all of the items in his boat at one time. Thus, he will have to
make multiple trips across the river. With each trip, he might have to leave part of his
cargo on the shore unattended.
If left unattended together, the wolf will eat the rabbit, and the rabbit will eat the cabbage.
In a JAVA program, there are three boolean variables – wolf, rabbit, and cabbage.
The value of each variable is true if that item is unattended on the shorefalse
Write an if statement that will set the boolean variabsafe to true if unattended
items will be safe, and to false if one of the items will get eaten.
if ((wolf && rabbit) || (rabbit && cabbage))
safe = false;
safe = tr