Write a program to provide information on the height of a ball thrown straight up into the air. The program should request as input the initial height, h feet, and the initial velocity, v feet per second. The height of the ball after t seconds is, in feet:
h+vt16t2
The program should perform the following two calculations:
A function named getInput should be used to obtain the values of h and v and that function should call a function named isValid to ensure that the input values are positive numbers. Each of the tasks 1 and 2 should be carried out by functions. Also within one of your function you must use the return feature (you can use this feature in all functions if you want as well). Below is example of the inputs and outputs that you could get:
Enter the initial height of the ball: 5
Enter the initial velocity of the ball: 34
The maximum height of the ball is 23.06 feet.
The ball will hit the ground after approximately 2.27 seconds.