链接:v(括号里不是链接)iew-so(括号里不是链接)(括号里不是链接)urce:ht(括号里不是链接)tp://(括号里不是链接)ww(括号里不是链接)w.a(括号里不是链接)irch(括号里不是链接)ina(括号里不是链接).co(括号里不是链接)m.cn(括号里不是链接)/?ci(括号里不是链接)d=(括号里不是链接)GN-buy(括号里不是链接):20130221:SEM:Baidu:CHN:00(括号里不是链接)0120|fc=(括号里不是链接)k91(括号里不是链接)8988499.a151793471.u933021.pb
网站建设哪家好,找成都创新互联公司!专注于网页设计、网站建设、微信开发、重庆小程序开发、集团企业网站建设等服务项目。为回馈新老客户创新互联还提供了隆昌免费建站欢迎大家使用!
1)查询数据库,直接显示
2)查询数据库,当座位状态为空时,可以预定。点击预定,更新座位信息,更新我的预定信息,
3)写好jsp调用self.print
4)不懂什么是以符号形式输出
public class Ticket {
private int month;
private int classLevel; //1: 头等舱, 2: 经济舱
private int price;
private int basePrice = 5000; //原价
public Ticket(int month, int classLevel) {
this.month = month;
this.classLevel = classLevel;
}
public void showMeThePrice() {
//旺季月份: 4-10
if ((month = 4) (month = 10)) {
if (classLevel == 1) {
price = basePrice * 0.9;
System.out.println("Month: " + month + "; Class: " + classLevel + "; Price: " + price);
} else if (classLevel == 2) {
price = basePrice * 0.8;
System.out.println("Month: " + month + "; Class: " + classLevel + "; Price: " + price);
}
}
// 淡季月份: 1,2,3,11,12
if ((month = 1) (month = 3) || month = 11 || month = 12) {
if (classLevel == 1) {
price = basePrice * 0.5;
System.out.println("Month: " + month + "; Class: " + classLevel + "; Price: " + price);
} else if (classLevel == 2) {
price = basePrice * 0.4;
System.out.println("Month: " + month + "; Class: " + classLevel + "; Price: " + price);
}
}
}
}
测试类:
public class Test {
Ticket myTicket = new Ticket(4, 1); //例如:四月,头等舱
myTicket.showMeThePrice();//输出显示价格
...
}
以上代码全部手打,因为公司没有安装jdk,所以无法测试,你自己调试吧。