added test cases to get input from comand line and convert it into
object. In case of invalid input an another chance is provided till
correct input is entered