Question: The objective of this program is to create a list of flight route entries, which allows a user to add, delete, and search for a





The objective of this program is to create a list of flight route entries, which allows a user to add, delete, and search for a given route. A table of flights will be contained within a dynamically allocated array in which each array element points to a flight structure. The flights can be initialized by reading them into a table from a text file. Detail: An array of pointers to Flight structs ("Flight Pointer Array") will be used to contain the table of flights. NOTE: This array is not an array of Flight structs but an array of pointers to Flight structs. lt should allow the user to add, remove, and search for given flights based on the Departure City and Arrival City. The Flight pointer array is a dynamically allocated table of pointers to Flight structs. Each time a flight (flight struct) is added to the table, the flight struct variable must be created using malloc) and initialized with the given flight information. The following diagram describes the flight struct pointer array structure: Flight 0 Flight 1 Flight 2 Flight N NULL(No route) A structure (named "Flight" using typedef) should be used with the following members: int flight Number; int depCityCode; int arrCityCode; int cost; The objective of this program is to create a list of flight route entries, which allows a user to add, delete, and search for a given route. A table of flights will be contained within a dynamically allocated array in which each array element points to a flight structure. The flights can be initialized by reading them into a table from a text file. Detail: An array of pointers to Flight structs ("Flight Pointer Array") will be used to contain the table of flights. NOTE: This array is not an array of Flight structs but an array of pointers to Flight structs. lt should allow the user to add, remove, and search for given flights based on the Departure City and Arrival City. The Flight pointer array is a dynamically allocated table of pointers to Flight structs. Each time a flight (flight struct) is added to the table, the flight struct variable must be created using malloc) and initialized with the given flight information. The following diagram describes the flight struct pointer array structure: Flight 0 Flight 1 Flight 2 Flight N NULL(No route) A structure (named "Flight" using typedef) should be used with the following members: int flight Number; int depCityCode; int arrCityCode; int cost
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
