Get the App
SLTechnology News&Howtos  ›  Development  › 

Course on how to use C++ to realize airline booking system

Shulou Source: shulou.com Published: 2022-06-01 05:57:05 10月03日 Update

This article mainly introduces how to use C++ to achieve air reservation system course, the article is very detailed, has a certain reference value, interested friends must read it!

The details are as follows

I. title

1. Input function

You can enter flight information (such as flight number, take-off and landing time, city, number of seats, ticket price)

two。 Query function

You can query the flight information (for example, according to the flight number, the take-off and landing city looks up the flight and displays the flight information)

3. Modify and delete function

You can modify and delete flight information.

4. Additional route

After the original route, you can continue to add routes to facilitate operation.

5. Booking function

You can book tickets and record relevant information about passengers (such as name, ID number).

6. Refund function

You can refund the ticket and record the passenger's relevant information as well as the refund information.

Code # include#include#include#includeusing namespace std;typedef struct Node {int hangbanhao;// flight number char qifeichengshi [10]; / take-off city char jiangluochengshi [10]; / landing city char qifeishijian [10]; / take-off time char jiangluoshijian [10]; / / landing time int zuoweishu;// seats int piaojia;// ticket price struct Node * pointer domain of next;// node} LNode,*LinkList / / define flight information LinkList as pointer type typedef struct CK {char name [10] to structure LNode; / / passenger name char id [18]; / / pointer domain of passenger ID number struct CK * next;// node} ck,*cke / / passenger information void import (int nPowerLinkList & L) / / input flight function: n is the number of flights to be entered: {/ / establish a single linked list of leading nodes LL = (LinkList) malloc (sizeof (LNode)); / / Application tablespace L-> the pointer field of the next=NULL;// header node LNode * tail=L;// assigns the tail to the tail pointer, equivalent to LinkList tail=L; for (int item0; I)

Tags: Flight city information time passenger node flight number input seat number of seats pointer fare key function success function name identity output system Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Shulou Information Shulou Technology MariaDB Docker