plane.cpp
来自「飞机场模拟飞机场模拟飞机场模拟飞机场模拟」· C++ 代码 · 共 25 行
CPP
25 行
#include"plane.h"
plane::plane(){}
plane::plane(time24 time,int has_fuel)
{
arrive_time=time;
fuel=has_fuel;
}
bool plane::is_falled(int time) //飞机是否坠毁
{
return time>=arrive_time.get_minute()+fuel;
}
int plane::get_fuel()
{
return fuel;
}
time24 plane::get_time()
{
return arrive_time;
}
bool operator<(plane p1,plane p2)
{
return p1.get_time().get_minute()+p1.get_fuel()>p2.get_time().get_minute()+p2.get_fuel();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?