Create a struct called airport with the identifier fields

Assignment Help Computer Engineering
Reference no: EM131299715

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' (https://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.

Reference no: EM131299715

Questions Cloud

Explain the advantages of leasing : They will be leasing the vehicles as opposed to purchasing them outright. Please explain the advantages of leasing and which lease type would be more preferable?
Identify data that you could store and the length of time : Identify the data that you could store and the length of time in which you should store it. You may be asked to report on weekly, monthly, or yearly average temperatures.
Determining the payroll package : Ahmad is an analyst. The human resources department is very unhappy with their payroll package. They want the information systems department to write them a new package as they think they have unique needs. What should Ahmad do?
Identify all its brand elements and assess their ability : Pick a brand. Identify all its brand elements and assess their ability to contribute to brand equity according to the choice criteria identified.
Create a struct called airport with the identifier fields : 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.
Make strong contributions to brand equity : What are some other examples of slogans not listed in that make strong contributions to brand equity? Why? Can you think of any "bad" slogans? Why do you consider them to be so?
Guidelines to help marketers mix and match brand elements : Can you think of some general guidelines to help marketers mix and match brand elements? Can you ever have "too many" brand elements?
What the weighted average cost of capital is : As her CFO, your excellent services are called upon, yet again. How would you explain to her what the weighted average cost of capital is and how it is calculated?
Have you had any experience with a brand : Have you had any experience with a brand that has done a great job with relationship marketing, permission marketing, experiential marketing, or one-to-one marketing?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Find total annual compensation policy to improve sales

The source code should demonstrate the use of conditional and looping structures.find total annual compensation policy to improve sales

  How to maintain different document object models

Both the Netscape/Mozilla and IE browsers maintain different document object models. Given the current era of open source, what do you think is the wisdom of maintaining two models.

  Possibility of writing a program

Discuss the possibility of writing a program that takes another program as input and determines if that program contains a virus.

  Standard apis supported by the jaxp

Explain two standard APIs supported by JAXP (Java API for XML processing) and provide a comparison between two mechanisms.

  What is the difference between risc and cisc

What is the difference between RISC and CISC? - t has to do with MIPS.

  There are five factors to consider when assessing the

there are five factors to consider when assessing the growing impact of it in business firms both today and over the

  Implement an application that will hold the customer list

You will need to implement an application that will hold the customer list for Acme Anvil Supply. This list will be read from a file and stored in a binary tree.

  Make an html page with a form for client

make a form using JavaScript that collects client body statistics and customer contact information for record keeping and marketing purposes.

  What is role of risk assessment

What is role of risk assessment

  Services commonly supported by a server

explain five services commonly supported by a server and address security mechanisms and devices that are used to support client/server functions.

  Algorithm for carrying out concatenation operation

Develop an algorithm that concatenates T1 and T2 into the single binary search tree. The worst case running time must be O(h), where h is the maximum of h1 and h2, the heights of T1 and T2.

  Write down an algorithm that returns the smallest value

Write down an algorithm that outputs the smallest and second smallest values in array.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd