enum{Empty, Full};//Empty == 0; Full == 1;
enum{Unpaid, Paid, Underway, Finished, Canceled};//Unpaid == 0; Paid == 1; Underway == 2; Finished == 3; Canceled == 4;
#define MaxSeat 500//now it is about 200 to 400;
#define MaxOrder 100
#define FlightNumber 10
#define IdNumber 18//ID card rule;
#define OrderNumber 14//8 + 6, the daily limit is 1 million;
#define AirportName 20
#define CustomerName 15
typedef struct {
int year;
int month;
int day;
int hour;
int minute;
}date;
typedef struct {
char number[FlightNumber];
date time_on;
date time_off;
char airport_on[AirportName];
char airport_off[AirportName];
double price;
double discount;//>0; <=1;
int present;//present <= MaxSeat;
}flight;
typedef struct {
char number[OrderNumber];
char customer[CustomerName];
char flight[FlightNumber];
int condation;//it can be Unpaid, Paid, Underway, Finished or Canceled;
}order;
typedef struct {
order* queue[MaxOrder];
int front;
int rear;
int amount;
}olist;//orders will be FIFO;
typedef struct {
char id[IdNumber];
char name[CustomerName];
olist orders;
}customer;
nuc_reservation.h#v0.2
最新推荐文章于 2024-02-23 13:14:32 发布