Salesforce Interview Question

How would you write a program for an elevator?