Astrata Group Interview Question

How to design a traffic light program