Write a function, scalarProduct, that calculates the scalar product of two arbitrary vectors (u1, u2, u3, ..., un) and (v1, v2, v3, ... , vn). The result should be: u1*v1 + u2*v2 + ... + un*vn.
Two vectors (u1, u2, u3, ..., un) and (v1, v2, v3, ... , vn) are ortogonal if the scalar product: is equal to 0.
Write a class, Orthogonal, that decides if two integer vectors are orthogonal. The vectors must have the same number of elements, but the number of elements should be arbitrary.
Applying the multiplication operator between two vectors gives the scalar product.
First we check if the vectors are of the same size and if they are we calculate the scalar product.
Since the value in the variable orthogonal is 1 the two vectors are orthogonal.
Check the value.