package lift;

class Door {
    private boolean open;
    private int passengersEntering;
    private int passengersExiting;

    /** Create a new closed door */
    public Door() {
        open = false;
        passengersEntering = 0;
        passengersExiting = 0;
    }

    /** Returns true if door is open */
    public boolean isOpen() {
        return open;
    }

    /** Open the door */
    public void open() {
        open = true;
    }

    /** Close the door */
    public void close() {
        open = false;
    }

    public int getEntering() {
        return passengersEntering;
    }

    public void setEntering(int passengers) {
        this.passengersEntering = passengers;
    }

    public int getExiting() {
        return passengersExiting;
    }

    public void setExiting(int passengers) {
        this.passengersExiting = passengers;
    }

}