People may enter a contest UNLESS they are less than 21 years old, make more than $100,000, or live in Ohio. The boolean expression is grouped so that it is true when a person CAN enter the contest.

A good answer might be:

!( age < 21 || pay > 100000 || home.equals("Ohio") )

End of the Chapter

You have reached the end this chapter. You may wish to review the following. Click on a subject that interests you to go to where it was discussed.



Click here     Back to the main menu.

You have reached the end of the chapter.