Formulatrix interview question

Trafic light problem using object-oriented programing