You’re a programmer working for a large aerospace company.

You’re a programmer working for a large aerospace company.  One of the aerospace engineers comes to you asking for help.

“I would like a program to help me calculate the airspeed of an object when I know its speed and direction over the ground, and I know the speed and direction of the wind. For example, if an object is moving east (i.e. 90 degrees) at 10 mph and the wind is coming from the east (i.e. 90 degrees) at 5 mph, then the object is experiencing 15 mph of airspeed because it’s moving directly into the wind. When the wind is not directly in front or behind, though, trigonometry comes into play. The formula looks like this:

Don't use plagiarized sources. Get Your Custom Essay on
You’re a programmer working for a large aerospace company.
From as low as $9/Page
Order Essay

Airspeed = (wind_speed * cosine (absolute_value(object_direction – wind_direction)) + object_speed

Can you write me a program that asks me for object direction, object speed, wind direction, and wind speed which then calculates airspeed for me? Don’t forget that the wind direction is the direction the wind is coming from. I need it to do this over and over until I enter zeros for all of those things. I’d like the output to look like this:”  (he draws the below on the whiteboard)

Object direction:  90
Object speed:  10
Wind direction:  90
Wind speed:  5
Airspeed = 15
Object direction:  90
Object speed:  10
Wind direction:  70
Wind speed:  5
Airspeed = 14.6984631039295
Object direction:  0
Object speed:  0
Wind direction:  0
Wind speed:  0

You’ll need to use the Math.Cos and Math.Abs methods. You also need to convert the object direction and wind direction into radians since that’s what Math.Cos uses. Recall that you need to multiply your value in degrees by pi/180 (i.e. degrees * pi/180). Pi in C# is Math.PI so you don’t have worry about the actual 3.14159… number. All your variables should be declared as doubles.

The following should help you get started (and is mirrored in the comments in the provided shell).

-Declare your variables

-Get user input

-Convert object direction and wind direction to radians

-Calculate airspeed using the above formula (don’t forget to take the absolute value of the direction subtraction)

-Output the airspeed for the user

-Get user input and stop when all zeros are entered

How to place an order?

Take a few steps to place an order on our site:

  • Fill out the form and state the deadline.
  • Calculate the price of your order and pay for it with your credit card.
  • When the order is placed, we select a suitable writer to complete it based on your requirements.
  • Stay in contact with the writer and discuss vital details of research.
  • Download a preview of the research paper. Satisfied with the outcome? Press “Approve.”

Feel secure when using our service

It's important for every customer to feel safe. Thus, at The Homework Writings, we take care of your security.

Financial security You can safely pay for your order using secure payment systems.
Personal security Any personal information about our customers is private. No other person can get access to it.
Academic security To deliver no-plagiarism samples, we use a specially-designed software to check every finished paper.
Web security This website is protected from illegal breaks. We constantly update our privacy management.

Get assistance with placing your order. Clarify any questions about our services. Contact our support team. They are available 24\7.

Still thinking about where to hire experienced authors and how to boost your grades? Place your order on our website and get help with any paper you need. We’ll meet your expectations.

Order now Get a quote