class Motor extends Observable {

    public synchronized void setRPM(int rpm) {
        if (rpm < 0 || rpm > SimulationConstants.MAX_MOTOR_SPEED) {
            throw new IllegalArgumentException("Motor RPM needs to be in range 0 to 3000");
        }
        this.rpm = rpm;
        setChanged();
        notifyObservers();
    }

    public  Motor(int initialRpm);

}