Gemalto interview question

Write a code to implement the functionality of a lift.