private void validateInput(Vector v1, Vector v2) {
    if (v1 == null || v2 == null) {
      throw new IllegalArgumentException("This method doesn't accept null vectors");
    }
  }
To resolve this problem we are going to take into account two main requirements: vectors can't
be null and the number of elements for vector have to be the same. Once we have added this
guards throwing execptions we are going to implement this algorithm.

To implement this scalar product we are going to iterate over v1 and v2 at the same time using
a pointer defined with an integer named "i". For every iteration we are going to accumulate
the product of elements at position "i" for v1 and v2 inside an auxiliary variable named
result.

The complexity order of this algorithm in time terms is O(N) where N is the number of elements
per vector. In space terms, the complexity order of this algorithm is O(1) because the
auxiliary data structures used to implement this algorithm are not related to any problem
parameter.
src/main/java/com/github/pedrovgs/problem2/VectorScalarProduct.java