Making a on/off/restart button or switch

Not clear from the requirements that it needs to be one switch. Maybe the req is vague so that you ask questions of whoever is setting this exercise. It’s the same with real customers, so maybe that is the real learning here?