Program 2 Test Cases Fall 2017

Some thoughts about the equations
It would be impossible to make the equations crash. g is a constant so it is not going to change, so there is no division by zero. Velocity is squared, so even a negative velocity will still be positive, but the sine function will give positive and negative answers, depending on the angle. This will not make the program crash, but it can give negative answers for distance.
 

Test cases for equations for distance and height

DescriptionInputs (angle, velocity) Expected Output
1. Normal: Positive distance, positive angle (between 0 and 90 degrees), positive velocity 45, 15 positive distance 23, positive height 6
2. get negative distance, angle between 90 and 180 degrees, positive velocity 100, 15 distance -8, height 11
3. get zero distance, positive velocity, angle between 180 and 270 degrees 180, 15 distance 0, height 0
4. positive distance again, positive velocity, angle between 270 and 360 degrees 200, 15 distance 15, height 1

Behavior of the program as a whole

DescriptionInputs (rounds) Expected Output
5. loop test for zero iterations 0, 5 (difficulty does not matter) program should tell me that I got no pigs and stop
6. loop test for one iteration 1, 5, 45, 15 shows distance travelled (23), distance to pig, height (6), results of flight
(hit or miss, points)
7. loop test for more than one iteration 2, 1, 40, 32.5, 45, 22 distance of bird (106), distance of pig, height of bird (22), results of flight (hit or miss, point or not),
distance of bird (49), distance of pig, height of bird (12), results of flight (hit or miss, point or not),
8. easy difficulty number of rounds 1 (does not matter), difficulty is 150 angle, velocity shows distance travelled, distance to pig, height, results of flight (hit or miss, points) hit or miss is correct based on distances
9. very hard level of difficulty number of rounds 1 (does not matter), difficulty is 10, angle, velocity shows distance travelled, distance to pig, height, results of flight (hit or miss, points) hit or miss is correct based on distances

Wins and losses (put in a seed call)

DescriptionInputs (rounds, diff, angle, velocity) Expected Output
several rounds with NO hits 3, 4, 45, 1000, 180, 500, 0, 5000 shows distance travelled, distance to pig, height, results of flight for 3 iterations, reports got no pigs
several rounds with ONE hit (will take more than one run to do it) 3, 4, 45, 1000, 180, 500, 0, 5000 shows distance travelled, distance to pig, height, results of flight for 3 iterations, reports got 1 pig
several rounds where ALL are hits (will take more than one run to do it, to know the numbers that will come up from the RNG) 4, 500, ... reports You got 4 pigs!