Create signal.cpp

C++ code for simulating a traffic signal