Question

CSC1101 TakeHome Lab02 (1),docx - Compatibility Mode Saved to this PC s Review View Help ρ Search 3. [11] You have been hired
Welcome to Projectile 0bjects! The object is launched at an initial velocity of: 10 m/s The angle is: 300 Time that the objec

C++ should be used

C++ should be used
CSC1101 TakeHome Lab02 (1),docx - Compatibility Mode Saved to this PC s Review View Help ρ Search 3. [11] You have been hired by Projectile Objects to create a calculator for various equations from kinematics. Suppose someone shoots an object and it does projectile motion with an angle of 30, 45 and 60 degrees to the horizontal. Choose it's initial velocity (ex. 10 m/s) find the maximum height it can reach, horizontal displacement and total time required for this motion. Here are the four equations you will be using: Your program should include the following steps: a. Calculate real valued vertical and horizontal velocity from initial velocity (hint: xVelocity initialVelocity*cos(angle); yVelocity initialVelocity*sin(angle), make sure you convert angle from degree to radians like so angle - angle pi/180); b. In vertical, do the following: i. Calculate the real value for time (hint: V-Vo + a*t → 0- yVelocity-gravity time - time- yVelocity/gravity, but since this is the time for half of the vertical motion, the real total time is time 2-time) ii. Calculate the real value for maximum height (hint: maxHeight 5 gravity" (.5 time), here we have to halve time because we are only considering the vertical displacement, not total distance traveled) c. In horizontal, do the following: i. Calculate the horizontal displacement (hint: X-Xo + Vo*t → maxLength-0+xVelocity time Use constant value for GRAVITY- 9.8 m/s/s, PI 3.1415 and for degree symbol char DEG char(167) (if you are using xcode, you can copy and paste your degree symbol into place of char( 167)). Output your results like so:
Welcome to Projectile 0bjects! The object is launched at an initial velocity of: 10 m/s The angle is: 300 Time that the object is in air: 1.02038 t Maximum height reached: 1.27544 m Horizontal displacement: 8.83684 m Welcome to Projectile Objects! The object is launched at an initial velocity of 10 m/s The angle is: 45° Time that the object is in air: 1.44304 1t Maximum height reached: 2.5509 Horizontal displacement: 10.2041 m Welcome to Projectile Objects! The object is launched at an initial velocity of: 10 m/s angle is: 60° Time that the object is in air: 1.76737 t Maximum height reached: 3.82639 m Horizontal displacement: 8.83731 m your program code here] If possible, format your oode 11ke this Font "Courier New" Bold
0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include<iostream>
#include<cmath>
using namespace std;

int main()
{
   const double GRAVITY = 9.8,PI=3.1415;
   char DEG = char(167);
   int angles[3]={30,45,60};
   double t, maxH,v0=10,range,vx,vy,angle;
   for(int i=0;i<3;i++)
   {
       cout<<"Welcom3 to Projectile Objects!\n";
       cout<<"===========================\n\n";
       angle = angles[i]*PI/180;
       cout<<"The object is launched at\n";
       cout<<"The initial velocity of: "<<v0<<endl;
       cout<<"The angle is: "<<angles[i]<<DEG<<endl;
       vx=v0*cos(angle);
       vy=v0*sin(angle);
       t=vy/GRAVITY;
       cout<<"Time that the object is in air: "<<2*t<<" t\n";
       maxH=.5*GRAVITY*t*t;
       range=vx*2*t;
       cout<<"Maximum height reached: "<<maxH<<" m\n";
       cout<<"Horizontal displacement: "<<range<<" m\n\n";
   }
   return 0;
  
}

Welcom3 to Projectile Objects! The object is launched at The initial velocity of: 10 The angle is: 309 Time that the object i

Add a comment
Know the answer?
Add Answer to:
C++ should be used C++ should be used CSC1101 TakeHome Lab02 (1),docx - Compatibility Mode Saved to this PC s Review View Help ρ Search 3. [11] You have been hired by Projectile Objects to cre...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • this is how output should look CSC1101 TakeHome Lab02 (1),docx - Compatibility Mode Saved to this PC S Review View. Help Search 3. [11] You have been hired by Projectile Objects to create a...

    this is how output should look CSC1101 TakeHome Lab02 (1),docx - Compatibility Mode Saved to this PC S Review View. Help Search 3. [11] You have been hired by Projectile Objects to create a calculator for various equations from kinematics. Suppose someone shoots an object and it does projectile motion with an angle of 30, 45 and 60 degrees to the horizontal. Choose it's initial velocity (ex. 10 m/s) find the maximum height it can reach, horizontal displacement and total...

  • THE VERTICAL DISPLACEMENT IS NOT ZERO BECAUSE THE PROJECTILE LANDS ON HEIGHT H Problem 1: Consider...

    THE VERTICAL DISPLACEMENT IS NOT ZERO BECAUSE THE PROJECTILE LANDS ON HEIGHT H Problem 1: Consider a projectile launched with an initial velocity of 120 f/s. Let us assume that the projectile lands on a a) Determine the range R as a function of time. b) Determine the initial launch angle, 8, such that the projectile achieves the maximum possible horizontal range Hint: think about how to compute maxima and minima from calculus. Once you have computed the launch angle...

  • ASSIGNMENT PROBLEMS 1: A projectile is fired with an initial speed of 60.0 m/s at an...

    ASSIGNMENT PROBLEMS 1: A projectile is fired with an initial speed of 60.0 m/s at an angle of 30.0°above the horizontal on a long flat field. Determine (a) The maximum height reached by the projectile. (b) The time it takes to get to the maximum height. (c) The total time in the air. (d) The total horizontal distance covered. (e) The velocity of the projectile 1.50 s after firing distance.

  • 213 2.4 #3 Projectile Motion Problem (24 Points) A mortar round is fired at an angle...

    213 2.4 #3 Projectile Motion Problem (24 Points) A mortar round is fired at an angle of 60.0 deelative to the horizontal axis with an initial speed of 300 m/s at a height of 950 meters above a level surface? Neglect the effects of air resistance, etc. and take the gravitational acceleration to be 9.8 m/s vertically down- ward a. What are the horizontal and the vertical components of the mortar round's velocity immediately after being launched? 300 cos(60) 160...

  • EXPLORE A projectile is launched with a launch angle of 30° with respect to the horizontal...

    EXPLORE A projectile is launched with a launch angle of 30° with respect to the horizontal direction and with an initial speed of 40 m/s. (A) How do the vertical and horizontal components of the projectile's velocity vary with time? (B) How long does it remain in flight? (C) For a given launch speed, what launch angle produces the longest time of flight? CONCEPTUALIZE Consider the projectile to be a point mass that starts with an initial velocity, upward and...

  • Dr. C. #1: Exploding Projectile: A projectile of mass 9.6 kg is shot from the ground with an init...

    Dr. C. #1: Exploding Projectile: A projectile of mass 9.6 kg is shot from the ground with an initial velocity of 12.4 m/s at an angle of 54° above the horizontal. A. Assuming the ground underneath the projectile's path is flat, what is the maximum height h the projectile reaches, its horizontal range R, and the time it spends in the air? Suppose that, at the peak of the projectile's motion, an explosion splits the projectile in half and one...

  • EXPLORE A projectile is launched with a launch angle of 30° with respect to the horizontal...

    EXPLORE A projectile is launched with a launch angle of 30° with respect to the horizontal direction and with an initial speed of 10 m/s. s0 (A) How do the vertical and horizontal components of the projectile's velocity vary with time? 40 35 (B) How long does it remain in flight? 25 (C) For a given launch speed, what launch angle produces the longest time of flight? 15 10 toy CONCEPTUALIZE Consider the projectile to be a point mass that...

  • Please help with Q1 a)b)c). Question 1: In the lectures we considered simple projectile motion. Here we extend the description to include air resistance. For macroscopic objects in air, the dynamics...

    Please help with Q1 a)b)c). Question 1: In the lectures we considered simple projectile motion. Here we extend the description to include air resistance. For macroscopic objects in air, the dynamics equations including air resistance may be written V and ^- where m is the mass of the object, g is the acceleration due to gravity, y is the vertical direction, C is a dimensionless drag coefficient, A is the cross-sectional area of the object, pa 1.2kg/m3 is the density...

  • 7. Do the projectile motion General Motion with Unit Vectors and Components An object undergoes the...

    7. Do the projectile motion General Motion with Unit Vectors and Components An object undergoes the following consecutive displacements: s (2i +3j +5k)m,s2 (6i- 9j + 2k)m, and s3 (10i 8j -k)m. a) Find the resultant displacement in terms of unit vectors and components. b) State the magnitude of the resultant displacement. 2. Suppose a hiker travels 5 km southwest from their camp. Then, the hiker travels 2 km 75° north of east. a) Find the displacement of the hiker...

  • ENES 100 Due 11/14/2018 Homework #6 Submit all your work in a thumb drive or via...

    ENES 100 Due 11/14/2018 Homework #6 Submit all your work in a thumb drive or via email using the appropriate filenames 1. When an object is launched from the ground with an initial velocity of vo at an angle of 0o, the horizontal and vertical displacements of the object travel before it hits ground can be written as functions of time t: x(t) - vo t cos(e) Uo Figure 1: Projectile of an object. A baseball has been tossed with...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT