CPTR 124 Fundamentals of Programming


In this lab you will use inheritance and polymorphism and a library of graphics classes to build a graphical application.


Traffic light with left turn signal

Modify the traffic light code found the SGL documentation. Add a fourth lamp that corresponds to a left turn signal. The bottom lamp is the left turn arrow, the next lamp up is green, then yellow, and the top lamp is red. The signal cycle should be red, left turn, green, yellow, red, ...

Picture of a trafficlight

  • Check out

    Your finished program will be evaluated for correctness and compliance. When approved, you should submit your C++ source file to eclass. Be sure your name and your partner's name are included in comments at the top of each source file.