Chat with us, powered by LiveChat Coding– Shell Is Attached | Writedemy

Coding– Shell Is Attached

Coding– Shell Is Attached

“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:

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

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order