Decisions Examples
STOP LIGHT
Given a stoplight color String(“red”, “green”, “yellow”), and a status of traffic String(“clear” or “busy”) write code to print out the answer to Can I turn?
boolean makeTurn; String light; String status;
Leap Year
Given an input year of type int, write code to determine if that year is a leap year.
Leap years can be calcuated by the following formula: