The relationship for the height of the elevator with respect to time is shown below in this screenshot.
Work Step by Step
The graph is drawn this way for the height of the elevator over time because the elevator is going up and people are getting on and off the elevator. In the graph, the horizontal lines represent when the elevator is stopped and people are getting on or off and thus the height is constant at that moment of time. The positive-sloped lines represent when the elevator is rising such s when the passengers stop at ground floor and the elevator goes to seventh floor, then ninth floor and eventually 10 floor. Also, the negative-sloped lines indicate when the elevator is descending such as when the people go from 10th floor to the ground floor.