Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Airport information.

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);

Don't forget your documentation.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92054363
  • Price:- $25

Priced at Now at $25, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Assignment week 2 documenting the project

Assignment: Week 2 Documenting the Project Lifecycle Well-written project documentation clarifies intent, documents decisions and results, and allows project managers to assess project progress (and report it, as necessa ...

Suppose that you are given a sorted list of n elements

Suppose that you are given a sorted list of n elements followed by f(n) randomly ordered elements. How would you sort the entire list if a. f(n) = 2? b. f(n) = vn? c. How large can f(n) be for the entire list to be sorte ...

What is the difference between dekkers algorithm and igloo

What is the difference between Dekkers Algorithm and Igloo approach? Please provide examples that can explain this.

Systems analysis chapter 6 please answer the four questions

Systems analysis chapter 6: Please answer the four questions at the tasks section Campus Bikes is a popular bicycle shop located near a major university. The business has grown and the owner, Mark Turner, wants to instal ...

An article in the wall street journal noted that an

An article in The Wall Street Journal noted that an" increase in the price of crude oil quickly reduces demand for oil". Do you agree with this statement? Briefly explain.

Is it okay too copy a fellow classmate programming code

Is it okay too copy a fellow classmate programming code when you are stuck? Will that break a school honesty policy? Please explain

Please help with anbspfunctionnbspcodesymbol to convert

Please help with a function  codeSymbol , to convert each mark to a symbol (A, B, C, D, E, F) and a code (7,6,5,4,3,2,1) according to the table below. And call it in the main function. Use the table below to determine th ...

Question suppose that in game of chance you bet an initial

Question : Suppose that in game of chance, you bet an initial amount of money, and every time you play, the money is doubled with probability p and halved with probability 1 - p. (a) What value of p gives you an expected ...

Question 1 identify the three main types of computer

Question: 1. Identify the three main types of computer software that were discussed in your unit lesson. Within the three main categories, give examples of each and a brief explanation of each. Each explanation/descripti ...

Once considered pure science fiction artificial

Once considered pure science fiction, artificial intelligence (AI) is being relied on more and more in today's world. Artificial intelligence deals with algorithms based on complex data sets. If you had to tell story rep ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As