Westonci.ca is the ultimate Q&A platform, offering detailed and reliable answers from a knowledgeable community. Connect with professionals on our platform to receive accurate answers to your questions quickly and efficiently. Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals.

Implement a class that simulates a traffic light. The next function advances the color in the usual way, from green to yellow to red, then again to green. Provide two constructors, of the public interface. Also supply a member function that yields the number of times that this traffic light has been red.