⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flight.h

📁 使用c++编写的民航管理系统
💻 H
字号:
#ifndef FLIGHT_H
#define FLIGHT_H
#include "Time.h"

class Flight
{
protected:
	char start[30];	//出发地点
	char destination[30];	//目的地点
	Time takeoff;	//起飞时间
	Time descent;	//到达时间
	char flightNumber[7];		//航班号
	char type[4];		//机型
	int  price;		//全价
	int  seats;		//座位总数
	int  ticketLeft;	//余票量
public:
	Flight *next;   //下一个节点
	Flight *previous;   //上一个节点

public:
	void set();		//Flight类的设置函数


	char *getstart();  //返回出发地点
	char *getDestination();		//返回目的地点
	char *getFlightNumber();	//返回航班号
	int  getTicketLeft();	//返回剩余票量
	void setStart();  //设置出发地点
	void setDestination();	//设置目的地点
	void setTakeoff();   //设置起飞时间
	void setDescent();   //设置到达时间
	void setFlightNumber();   //设置航班号
	void setType();   //设置机型
	void setPrice();   //设置全价
	void setSeats();   //设置座位总数
	void setTicketLeft(int);   //设置余票量 
		

	friend istream & operator >>(istream &in,Flight &flight);   //重载"》"
	friend ostream & operator <<(ostream &out,Flight &flight);   //重载"《"
};
#endif




⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -