nuc_reservation.h#v0.2

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;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值