Which of the following algorithms best represents a real-world process that involves both selection and repetition, where selection involves decision making and repetition involves doing something over and over again?
Group of answer choices
Traffic Light Control: Continuously cycle through green, yellow, and red. If a pedestrian button is pressed, extend the red light duration before continuing the cycle.
Password Entry System: Prompt the user to enter a password. If the password is incorrect, display an error and allow up to three more attempts. If correct, grant access.
Vending Machine Operation: Wait for money to be inserted. If the correct amount is entered, dispense the selected item; otherwise, display an error message and return the money.
Coffee Machine Brewing: Heat water, pour it over coffee grounds, and fill the cup. If the cup is full, stop pouring; otherwise, continue until the max level is reached.