Tourism Management System in C/C++
The Tourism Management System is implemented by C programming. It is as same as one can see while going for online booking. Here, the underlying idea is to present users with two choices International or India Tour packages. Then according to the choice, the available packages will be displayed. The next step is to mention the total number of passengers and all the necessary details of the passengers. The total amount will be evaluated and a receipt will be generated on the screen.
- A structure is implemented for taking the details of the passengers like name, gender, and age.
- Six functions– void details(), void add_node(char, char, int), void receipt(), void heading(), void inter(), void india() are created to handle different functionality.
- The heading() function is declared that will make the heading of the portal.
- The system(“cls”) is used to clear our screen.
- Three elements are added in the structure like two strings one for taking passenger name and gender, and one integer for taking passenger age. Also, the structure pointer will be used that will help to link the next node of another passenger. It is similar to a linked list.
- Some character arrays are defined and some integer arrays as globally.
- The user has to give choice for International or Indian Tour packages.
- If the user choose International tour packages then inter() function will be called. Here, the user has to choose certain packages from a list.
- If the user choose the India tour package then india() function will be called. Here, the user has to choose certain packages from a list.
- The details() function will be called to take the number of passengers.
- A for loop will be executed to take details of each passenger. Then the taken details will be sent to the add_node() function.
- In the add_node function, every detail will store into a node for each passenger. This node will link each other. This is based on the linked list concept.
- At last, the receipt() function will be called, which will display all the necessary details.
Source Code: Below is the implementation of the above approach