Here are the links to view the java source files of the Elevator Simulator. The ZIP file containing the source files and the class files can also be downloaded. 

Building.java    -> This is the main class of the simulator. This class extends from applet. It controls the creation of the Elevator class, the Timer class, the two floors and the buttons that are used to generate a person on either floor. This class also establishes the relationship between the action performers and their respective listeners.

Elevator.java  -> This class controls the behavior of the elevator. It is implemented as a thread to make it more powerful and independent from the other classes. It controls the movement of the elevator both when there is a passenger inside it and when a person on the floor is waiting for it. It is also responsible for creating and operating the elevator light, door, buttons and bell. In addition to this, it performs the animation of the movement of the elevator from one floor to the other according to an independent timer.

Floor.java  -> This class controls the activities of each of the floors. It is responsible for creating and operating the floor doors, lights,  bells and call buttons. It controls the arrival of a person on the floor and the call to the elevator. 

Passenger.java  -> This class is responsible for the actions performed by a person/passenger. It controls a person's arrival on a floor by calling the appropriate floor class method. It is also responsible for riding and leaving the elevator. Each of the person's action has a corresponding animation. To accomplish all of these efficiently, it is also implemented as a thread.

Timer.java  -> This class, too, is implemented as a thread. It controls the painting of the wall clock and the movement of its hand around the face in time with the elevator movement from one floor to the other. The movement of the clock hand is also in accord with the same independent timer that guides the elevator animation. (In order for the animation of the clock to be at the same time as that of the elevator.)

Light.java -> This class is responsible for painting the lights and controlling their operation. It also displays their status (on/off) in the applet as they change.

Bell.java  -> This class is responsible for making a specific sound when the elevator arrives at a floor.

Doors.java  -> This class is responsible for painting the doors and controlling both their operation and the corresponding opening and closing animation of each. It also displays their status (open/closed) in the applet as they change.

SimButton.java  -> This class is responsible for painting the buttons and controlling their operation. It also displays their status (on/off) in the applet as they change.