Implements constructor function, as well as an input validating function, and a test fucntion for determining users guess in comparison to the secret value.