Question: Please complete the following program in C coding language ( NOT C + + ) , instructions are attached. In the end, two files must

Please complete the following program in C coding language (NOT C++), instructions are attached. In the end, two files must be submitted, "airport.c" and "airportReport.c"
Here is the given code for "airport.h":
/**
* This is a collection of utility functions involving
* and airport structure.
*/
typedef struct {
//TODO: use your definition here
} Airport;
/**
* A factory function to create a new Airport with the given
* attributes. This function should make *deep* copies of each
* of the relevant fields and return a pointer to the newly
* created Airport structure.
*/
Airport* createAirport(const char* gpsId,
const char* type,
const char* name,
double latitude,
double longitude,
int elevationFeet,
const char* city,
const char* countryAbbrv);
/**
* This function initializes an existing allocated
* Airport structure with the given attributes.
*/
void initAirport(Airport* airport,
const char* gpsId,
const char* type,
const char* name,
double latitude,
double longitude,
int elevationFeet,
const char* city,
const char* countryAbbrv);
/**
* Constructs a new string representation of the given
* Airport structure.
*/
char* airportToString(const Airport* a);
/**
* Prints all the airports in the given array of n
* Airports.
*/
void printAirports(Airport *airports, int n);
/**
* cmputes the air distance, in kilometers, between
* the two Airports using their latitude/longitude
*/
double getAirDistance(const Airport* origin, const Airport* destination);
/**
* cmputes the estimated travel time (in hours) for a flight
* that involves the given stops using the average flight speed
*(kilometers per hour) and average layover time (in hours)
*/
double getEstimatedTravelTime(const Airport* stops,
int size,
double aveKmsPerHour,
double aveLayoverTimeHrs);
/**
* A comparator function that orders the two Airport structures by
* their GPS IDs in lexicographic order.
*/
int cmpByGPSId(const void* a, const void* b);
/**
* A comparator function that orders the two Airport structures by
* their type.
*/
int cmpByType(const void* a, const void* b);
/**
* A comparator function that orders the two Airport structures by
* their name in lexicographic order.
*/
int cmpByName(const void* a, const void* b);
/**
* A comparator function that orders the two Airport structures by
* their name in reverse lexicographic order.
*/
int cmpByNameDesc(const void* a, const void* b);
/**
* A comparator function that orders the two Airport structures first by
* country, then by city
*/
int cmpByCountryCity(const void* a, const void* b);
/**
* A comparator function that orders the given Airport structures
* by their latitudes north to south
*/
int cmpByLatitude(const void* a, const void* b);
/**
* A comparator function that orders the given Airport structures
* by their longitudes west to east
*/
int cmpByLongitude(const void* a, const void* b);
/**
* A comparator function that orders the two Airport structures by
* their relative distance from Lincoln Municipal Airport
*(0R2,40.846176,-96.75471)
* in ascending order according (closest to Lincoln would come first)
*/
int cmpByLincolnDistance(const void* a, const void* b);
/**
* A function that generates and prints several reports on the
* given array of Airport structures.
*/
void generateReports(Airport *airports, int n);
The given code for "airport.c" which needs to be completed with the implementations of the functions in "airport.h", is attached in 3 separate screenshots. Thanks so much! ```
#include
#include "airport.h"
vold generateReports(sirport: *aimports, Int n){
printf("Ainports (original):
");
```
```
printAirports(ainports; n);
printf("
alenponts By GPS ID:
");
```
```
printf(*
Airportis By Type:
");
```
```
printf("
Airponts:By Rame = Revensed:
");
```
```
printf("
Airponts By Country/City:
");
```
```
printf("
alirponts By latitudes
");
```
```
printf("
airports : 8y Longitude:
");
``````
printf("
Airporits By bistance from Lincoln: '
");
```
```
printf(")
closest Alrport to Lincoln:
");
```
```
printf(=
furshest kirpore from Lincoln:
");
```
```
printf("lnEast-West Geographic Center:
");
```
```
printf("
Nlew York; IN% airports:
");
```
```
//lif none founds print: "Wo ticg Mork aileport, found ling"
printf("
targe girport: '
");
```
```
retunn;
}
chan* airportToString(colist Airport** a){
char itemp[1000]:
``````
\f to four thefIntlion of gour Almport structure;
sprintf(temp; %-85 K-15s %-20s z.2f %.2f %d %-16s%-25%, a->gpsId, a->type; a->name;
a->latitude, a->longitude, a->elev

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!