Question: Below is the question. Below is the starter code. Below is the grading rubric. I do not want the same answer that was used for
Functions - Upset Fowls In this assignment, you'll make a knock-off version of the Angry Birds game. The starter program is a working first draft of the game. 1. Correct the first FIXME by moving the intro text to a function named Printintro. Development suggestion: Verity the program has the same behavior before continuing. 2. Correct the second FIXME. Notice that the function GetUsrinpt will need to return two values: fowlAngle and fowlVel. 3. Correct the third FIXME. Notice that the function LaunchFowl only needs to return the value fowlLandingX, but needs the parameters fowlAngle and fowlVel. 4. Correct the fourth FIXME. Notice that the function DtrmnlfHit only needs to return the value didHitSwine, but needs the parameters fowlLandingX and swineX The main should now look like the following code and the program should behave the same as the first draft int main(O double fowlAngie e.e; // angle of launch of fowl (rad) double fowlvel e.0; // velocity of fowl (m/s) double swinex - 0.e; // distance to swine (m) double fowlLandingx = .0; // fowl's horiz. dist, from start (n) bool didHitswine - false; // did hit the swine? srand (time()); swinex = (rand() % 201) + 50; PrintIntro); GetusrInpt (swineX, fowlAngle, fowlVel); fowl Landingx = LaunchFowl(fo!Angle, fowVel); didHitSwine DtrmnIfHit(fowlLandingx, swinex)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
