Astrata Group interview question

How to design a traffic light program