Design Patterns, Behavioural Design, Java, Software Development.
args) { TrafficLight trafficLight = new TrafficLight(); // Simulate traffic light changes trafficLight.changeState(); // Output: Red Light: Stop trafficLight.changeState(); // Output: Green Light: Go trafficLight.changeState(); // Output: Yellow Light: Prepare to Stop trafficLight.changeState(); //