*/Create all the possible origin/destinations from the airport codes provided. Load the origin/destination string onto a stack or queue for processing */ // MS Visual Studio 2015 uses "stdafx.h" - 2017 uses "pch.h" //#include "stdafx.h" //#include "pch.h" #include #include using namespace std; const int AIRPORT_COUNT = 12; string airports[AIRPORT_COUNT] = {"DAL","ABQ","DEN","MSY","HOU","SAT","CRP","MID","OKC","OMA","MDW","TUL"}; int main() { // define stack (or queue ) here string origin; string dest; string citypair; cout << "Loading the CONTAINER ..." << endl; // LOAD THE STACK ( or queue) HERE // Create all the possible Airport combinations that could exist from the list provided. // i.e DALABQ, DALDEN, ...., ABQDAL, ABQDEN ... // DO NOT Load SameSame - DALDAL, ABQABQ, etc .. cout << "Getting data from the CONTAINER ..." << endl; // Retrieve data from the STACK/QUEUE here } Using the attached program (AirportCombos.cpp), create a list of strings to process and place on a STL STACK container. The provided code is meant to be generic. Using the provided 3 char airport codes, create a 6 character string that is the origin & destination city pair. Create all the possible origin/destinations possible combinations f
Types of Linked List
A sequence of data elements connected through links is called a linked list (LL). The elements of a linked list are nodes containing data and a reference to the next node in the list. In a linked list, the elements are stored in a non-contiguous manner and the linear order in maintained by means of a pointer associated with each node in the list which is used to point to the subsequent node in the list.
Linked List
When a set of items is organized sequentially, it is termed as list. Linked list is a list whose order is given by links from one item to the next. It contains a link to the structure containing the next item so we can say that it is a completely different way to represent a list. In linked list, each structure of the list is known as node and it consists of two fields (one for containing the item and other one is for containing the next item address).
*/Create all the possible origin/destinations from the airport codes provided. Load the origin/destination string onto a stack or queue for processing */ // MS Visual Studio 2015 uses "stdafx.h" - 2017 uses "pch.h" //#include "stdafx.h" //#include "pch.h" #include <iostream> #include <string> using namespace std; const int AIRPORT_COUNT = 12; string airports[AIRPORT_COUNT] = {"DAL","ABQ","DEN","MSY","HOU","SAT","CRP","MID","OKC","OMA","MDW","TUL"}; int main() { // define stack (or queue ) here string origin; string dest; string citypair; cout << "Loading the CONTAINER ..." << endl; // LOAD THE STACK ( or queue) HERE // Create all the possible Airport combinations that could exist from the list provided. // i.e DALABQ, DALDEN, ...., ABQDAL, ABQDEN ... // DO NOT Load SameSame - DALDAL, ABQABQ, etc .. cout << "Getting data from the CONTAINER ..." << endl; // Retrieve data from the STACK/QUEUE here }
Using the attached
Using the provided 3 char airport codes, create a 6 character string that is the origin & destination city pair. Create all the possible origin/destinations possible combinations from the airport codes provided. Load the origin/destination string onto a stack for processing. Do not load same/same values, such as DALDAL, or LAXLAX. See comments in the program from more details.
After loading the values, Create a loop to display all the values in the container. This loop should inherently remove items as they are displayed.
Deliverable is a working CPP program.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images