老师的作业,帮忙啊
•写以下类: • 飞机:型号,最大座位数,最大航程。 • 航班:航班号,航空公司名称,航空公司代号,航班日期,出发地,目的地, • 起飞时间,到达时间,里程,使用飞机,剩余座位,全价,折扣率。 • 方法:setPlane(Plane p); • 客户:姓名,身份证号,帐户余额。 • 方法:order(Flight f); 要代码啊,谢谢大家了
老师的作业,帮忙啊
•写以下类: • 飞机:型号,最大座位数,最大航程。 • 航班:航班号,航空公司名称,航空公司代号,航班日期,出发地,目的地, • 起飞时间,到达时间,里程,使用飞机,剩余座位,全价,折扣率。 • 方法:setPlane(Plane p); • 客户:姓名,身份证号,帐户余额。 • 方法:order(Flight f); 要代码啊,谢谢大家了
为了统一,都使用汉语拼音
下面是三个类,类中的两个方法你自己实现。
class plane
{
private String xinghao;
private String zuidazuoweishu;
private String zuidahangcheng;
public plane()
{ }
public plane(String xinghao,String zuidazuoweishu,String zuidahangcheng)
{
this.xinghao=xinghao;
this.zuidazuoweishu=zuidazuoweishu;
this.zuidahangcheng=zuidahangcheng;
}
}
class hangban
{
private String hangbanhao;
private String hangkonggongsimingcheng;
private String hangkonggongsidaima;
private String hangbanriqi;
private String chufadi;
private String mudidi;
private String qifeishijian;
private String daodashijian;
private double licheng;
private String shiyongfeiji;
private String shengyuzuowei;
private double quanjia;
private double zhekoulv;
public hangban()
{ }
public hangban(String hangbanhao,String hangkonggongsimingcheng,String hangkonggongsidaima,String hangbanriqi,
String chufadi, String mudidi,String qifeishijian,String daodashijian,double licheng,String shiyongfeiji,
String shengyuzuowei,double quanjia,double zhekoulv)
{
this.hangbanhao=hangbanhao;
this.hangkonggongsimingcheng=hangkonggongsimingcheng;
this.hangkonggongsidaima=hangkonggongsidaima;
this.hangbanriqi=hangbanriqi;
this.chufadi=chufadi;
this.mudidi=mudidi;
this.qifeishijian=qifeishijian;
this.daodashijian=daodashijian;
this.licheng=licheng;
this.shiyongfeiji=shiyongfeiji;
this.shengyuzuowei=shengyuzuowei;
this.shengyuzuowei=shengyuzuowei;
this.quanjia=quanjia;
this.zhekoulv=zhekoulv;
}
public String setPlane(Plane p)
{
///你的代码
}
}
class kehu
{
private String xingming;
private String shenfenzheng;
private double zhanghuyue;
public kehu(){}
public kehu(String xingming,String shenfenzheng,double zhanghuyue)
{
this.xingming=xingming;
this.shenfenzheng=shenfenzheng;
this.zhanghuyue=zhanghuyue;
}
public String order(Flight f)
{
////你的代码
}
}