Expert Answers

1. Write a boolean expression that will evaluate to true if the checkbox named regentsCompletedCheckBox is checked.
2. Write an if statements that displays the text “You are eligible to vote!” in the voteStatusLabel if the value in the variable age is 18 or higher.
Display “You are not old enough to vote!” if the value in the variable age is less than 18.
3. This is an expansion of the previous problem. Write an if statement that displays the text “You are eligible to vote!” in the voteStatusLabel if
the value in the variable age is 18 or higher and the variable isRegistered is true. Display “You are not eligible to vote!” if the value in the
variable age is less than 18 or the variable isRegistered is false.
4. Write an If statement that will set the resultLabel to the text “Look out for rainbows” if both of the checkboxes sunShiningCheckBox and rainingCheckBox are checked.
5. Write an if statement that will set the resultLabel to “I will pass the exam!” if the checkboxes studyCheckBox, workExamplesCheckBox, and
askQuestionsCheckBox are all checked.