$35
Using your previous HW code, we develop an application code of the cannonball shooting. The program should follow the flowchart:
Your code must have:
Develop a function takes a Projectile object, a target position , and a time step, , computes the projectile, and returns the difference between the landed position and the target position, .
The target position must be . Throw exception if not satisfied.
The initial speed must be . Throw exception if not satisfied.
The initial angle must be . Throw exception if not satisfied.
The target is determined to be destroyed if , where is the landed position.
Use your "ProjectileWithDrag" class to create a object.
You can define the weight of cannonball and the drag coefficient as you like.
Upload all files required to compile your code.
https://tulane.instructure.com/courses/2165899/assignments/13476042 2/2