Pregunta de entrevista de Salesforce

How would you write a program for an elevator?