Airport information. Academic Essay

Paper , Order, or Assignment Requirements

Create a struct called Airport with the following fields:

Identifier. This should be an array of four character or a pointer to an array of characters.

The following properties are doubles:

Coordinates which consist of Latitude and Longitude. Latitude is positive to indicate is North of the Equator and negative when it’s located in the southern hemisphere. Longitude is negative to indicate is West and positive to indicate it’s East of the Greenwich median.

A magnetic variation which also is indicated negative for West and positive for East. It is OK to have no magnetic variation.

Elevation above sea level in feet.

For example San Diego airport has the values ID: SAN, Lat: 32.7335556, Long: -117.1896667, Var: 14, Elev: 16.8′ (http://www.airnav.com/airport/SAN)

Also create a method inside the structure called getDistance that takes four doubles and use the formula from Project 1.

Create another method inside the structure called getDistance2, this method should take one and only one Airport as parameter. This method should break down the elements of each airport and call the getDistance method to return the distance in nautical miles.

To test your program, you will declare two Airport variables and will ask the user to enter their ID, Coordinates, Elevation and Magnetic Variation. Then you will calculate the distance between the two using the getDistance2 method. Assuming the user entered the values below, the program should work if it had the following code:

// Variable declaration

double dist;

Airport SAN, SFO;

// // User input

SAN.Latitude = 32.7335556;

SAN.Longitude = -117.1896667;

SFO.Latitude = 37.6188056;

SFO.Longitude = -122.3754167;

// Calculations

dist = SAN.getDistance2(SFO);

Is this question part of your Assignment?

We can help

Our aim is to help you get A+ grades on your Coursework.

We handle assignments in a multiplicity of subject areas including Admission Essays, General Essays, Case Studies, Coursework, Dissertations, Editing, Research Papers, and Research proposals

Header Button Label: Get Started NowGet Started Header Button Label: View writing samplesView writing samples