I changed the implementation of setInputs() so that you can set new values inputs of any gate but not add inputs. Earlier, there was a functionality to add gates and hence the condition was checking if the number of provided nputs was greter than 2 or no! However, in real world, we choose a gate and it has a fixed number of inputs. A gate whose inputs can  be incresed arbitrarily is not very practical i felt. I can put back the feature. But, what do yoy think? Should there be a restriction of number of inputs of gate or no? in the sense that, once a gate is created, one should not be able to change the number of its inputs