ITEC 1620 Lecture Notes - Black Pepper

71 views2 pages

Document Summary

A farmer needs to transport a wolf, a rabbit, 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 shore, and false otherwise. A certain chef insists that chicken needs a flavouring to make it edible. This chef has three flavourings: chili, lemon, and black pepper. The chicken needs at least one flavouring, but chili and lemon can"t be used at the same time, and chili and pepper can"t be used at the same time either.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents