CS 149 Fall 2018 - Instructor: Molloy Sections: 10 and 11

Home
Calendar
Syllabus
Resources
Linux Install

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;

RightTurn.java

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:

http://www.wikihow.com/Calculate-Leap-Years

LeapYearNested.java