Question: Programming Assignment 2 Ideal Projectile Motion In this project you will build a computer model of a projectile that is fired with an initial angle

 Programming Assignment 2 Ideal Projectile Motion In this project you will
build a computer model of a projectile that is fired with an
initial angle a and initial speed vo. In this model you will
assume air resistance is negligible and that the only external force acting

Programming Assignment 2 Ideal Projectile Motion In this project you will build a computer model of a projectile that is fired with an initial angle a and initial speed vo. In this model you will assume air resistance is negligible and that the only external force acting on the projectile is the force of gravity. In this case the graph of the trajectory will be a parabola. The way you will represent the trajectory is with a display of X.y-coordinates of the position of the projectile. The x.y-coordinates will be generated from the time of flight of the projectile. For example, if at time 10 seconds the x-coordinate was 100 and the y-coordinate was 150 then the ordered pair (100,150) would be on the graph of the trajectory. You are to write this program as a C++ program. You should use the iostream include. Your program should use the cout for diplaying output and cin to accept as input the initial angle of elevation a, the initial speed vo and the gravity constant g (9.8 if initial speed is in meters per second or 32 if the initial speed is in feet per second). Your program should be structured as follows. 1. Your program should start by requesting from the user the initial firing angle, initial speed, and g. 2. The program should then call a void function that receives the initial speed, initial angle, and g and prints out the following header part of your report. Name: CSC-210 Programming Assignment-2 Ideal Projectile Motion Initial firing angle: ### Initial Speed: ####### Maximum height: ###########.## Flight Time: #######.## Range: ############### (Round to nearest whole number) Trajectory values Time in Seconds X-coordinate y-coordinate 3. The program should then start a loop on seconds from 0 to the nearest second of the time of flight. 4. On each iteration of the loop the program should call a void function called calculate TrajCoordinate passing, by value, the firing angle, the initial speed and the time in seconds, returning. by reference, the x-coordinate, and y-coordinate of the projectile at time t. 5. Once the function returns the x-coordinate and y-coordinate the program should print out the trajectory information as

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!