【簡介:】本篇文章給大家談?wù)劇讹w機(jī)訂票系統(tǒng)是實(shí)時(shí)系統(tǒng)嗎》對應(yīng)的知識(shí)點(diǎn),希望對各位有所幫助。本文目錄一覽:
1、用Java鏈接mysql數(shù)據(jù)庫編寫一個(gè)簡單的飛機(jī)票訂票系統(tǒng),大學(xué)作業(yè)級(jí)別,急?。?!
本篇文章給大家談?wù)劇讹w機(jī)訂票系統(tǒng)是實(shí)時(shí)系統(tǒng)嗎》對應(yīng)的知識(shí)點(diǎn),希望對各位有所幫助。
本文目錄一覽:
- 1、用Java鏈接mysql數(shù)據(jù)庫編寫一個(gè)簡單的飛機(jī)票訂票系統(tǒng),大學(xué)作業(yè)級(jí)別,急!??!
- 2、JAVA航空訂票系統(tǒng) 急求?。∽鳂I(yè)??!
- 3、求java編寫簡單的航空訂票系統(tǒng),不需要用到j(luò)avaweb和數(shù)據(jù)庫 的代碼,利用文本字節(jié)流的方式存放在文本中
- 4、JAVA數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì),航空訂票系統(tǒng)求助
- 5、Java,飛機(jī)訂票系統(tǒng)
- 6、JAVA訂票系統(tǒng),基于JAVA的訂票系統(tǒng),要求蠻多,求幫忙
用Java鏈接mysql數(shù)據(jù)庫編寫一個(gè)簡單的飛機(jī)票訂票系統(tǒng),大學(xué)作業(yè)級(jí)別,急?。?!
swing 是吧, eclipse中的swing插件可以讓你像在WINFORM中那樣托控件.
但是, 一樓是正解, 這個(gè)需要RMB的.
JAVA航空訂票系統(tǒng) 急求??!作業(yè)??!
你這給100分都不見的有人給你做了。。。除非有人正好有一樣的。。。
求java編寫簡單的航空訂票系統(tǒng),不需要用到j(luò)avaweb和數(shù)據(jù)庫 的代碼,利用文本字節(jié)流的方式存放在文本中
用控制臺(tái)做用戶界面嗎?從控制臺(tái)輸入飛機(jī)批次 然后輸入時(shí)間 然后點(diǎn)擊Enter鍵 信息就應(yīng)該提交到j(luò)ava程序中 并且保存到文本中 然后在輸入查看自己的訂票 然后再提交 就可以看到自己訂的票了 不過似乎也先需要查詢批次的 查詢的話 就需要把文本的內(nèi)容進(jìn)行分段顯示了
JAVA數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì),航空訂票系統(tǒng)求助
今天比較閑,編了一套,一共4個(gè)class。不懂再問。
這格式真要命,湊活看吧。
publicenumAirClass{
FIRST,
SECOND,
THIRD
}
--------------------------------------------
publicclassCustomer{
privateStringname;
privateintticketNumber;
privateAirClassairClass;
publicCustomer(Stringname,intticketNumber,AirClassairClass){
this.name=name;
this.ticketNumber=ticketNumber;
this.airClass=airClass;
}
publicStringgetName(){returnname;}
publicvoidsetName(Stringname){this.name=name;}
publicintgetTicketNumber(){returnticketNumber;}
publicAirClassgetAirClass(){returnairClass;}
}
------------------------------------------------
importjava.util.LinkedList;
importjava.util.List;
publicclassAirLine{
privateStringdestination;
privateStringflightName;
privateStringflightNumber;
privateintdayOfWeek;
privateintcapacity;
privateintremainder;
privateListCustomerbooking=newLinkedListCustomer();
privateListCustomerpreBooking=newLinkedListCustomer();
publicAirLine(Stringdestination,StringflightName,StringflightNumber,intdayOfWeek,intcapacity){
this.destination=destination;
this.flightName=flightName;
this.flightNumber=flightNumber;
this.dayOfWeek=dayOfWeek;
this.capacity=capacity;
this.remainder=capacity;}
publicStringgetDestination(){returndestination;}
publicStringgetFlightName(){returnflightName;}
publicStringgetFlightNumber(){returnflightNumber;}
publicintgetDayOfWeek(){returndayOfWeek;}
publicintgetCapacity(){returncapacity;}
publicintgetRemainder(){returnremainder;}
publicListCustomergetBooking(){returnbooking;}
publicListCustomergetPreBooking(){returnpreBooking;}
publicbooleanaddBooking(Customerc){
if(this.remainder=c.getTicketNumber()){
this.remainder=this.remainder-c.getTicketNumber();
this.booking.add(c);
returntrue;
}else{
this.preBooking.add(c);
returnfalse;
}
}
publicvoidremoveBooking(Customerc){
if(this.booking.contains(c)){
this.booking.remove(c);
this.remainder=this.remainder+c.getTicketNumber();
}else{
thrownewIllegalArgumentException("Customernotfound.");
}
}
publicvoidremovePreBooking(Customerc){
if(this.preBooking.contains(c)){
this.preBooking.remove(c);
}else{
thrownewIllegalArgumentException("Customernotfound.");
}
}
publicStringtoString(){
returnthis.flightName+":"+this.flightNumber+":"
+this.dayOfWeek+":"+this.remainder;
}
}
---------------------------------
importjava.util.Calendar;importjava.util.Date;
importjava.util.LinkedList;importjava.util.List;
importjava.util.concurrent.TimeUnit;
publicclassMain{
privateListAirLineairLines=newLinkedListAirLine();
privatevoidinit(){
finalAirLineairLine1=newAirLine("beijing","flightName","flightNumber",Calendar.MONDAY,300);
this.airLines.add(airLine1);
//自己加新的airLine2,airLine3...
finalCustomercustomer1=newCustomer("Tom",2,AirClass.FIRST);
airLine1.addBooking(customer1);
//自己加新的customer2,customer3...
}
publicAirLinesearch(Stringdestination){
if(destination==null)returnnull;
finalintcurrenDayOfWeek=Calendar.getInstance().get(Calendar.DAY_OF_WEEK);
AirLineres=null;
intdiffToCurrenDate=7;
for(AirLinea:airLines){
if(destination.equals(destination)){
if(res==null){
res=a;
continue;
}
intdiff=a.getDayOfWeek()-currenDayOfWeek;
if(diff0)diff=diff+7;
if(diffdiffToCurrenDate){
diffToCurrenDate=diff;
res=a;
}
}
}
if(res==null){
System.out.println("Notfound");
}else{
System.out.println("日期"+newDate(System.currentTimeMillis()+TimeUnit.DAYS.toMillis(diffToCurrenDate))+":"+res.toString());
}
returnres;
}
publicvoidbooking(AirLinea,Customerc){
if(a.addBooking(c)){
System.out.println("訂到了");
}else{
System.out.println("排隊(duì)中");
}
}
publicvoidcancel(AirLinea,Customerc){
a.removeBooking(c);
for(Customerpre:a.getPreBooking()){
if(a.addBooking(pre)){
a.removePreBooking(pre);
System.out.println("排隊(duì)的訂到了");
break;
}else{
System.out.println("票余量不夠當(dāng)前面排隊(duì)的人,下一個(gè)");
}
}
}
}
Java,飛機(jī)訂票系統(tǒng)
鏈接:v(括號(hào)里不是鏈接)iew-so(括號(hào)里不是鏈接)(括號(hào)里不是鏈接)urce:ht(括號(hào)里不是鏈接)tp://(括號(hào)里不是鏈接)ww(括號(hào)里不是鏈接)w.a(括號(hào)里不是鏈接)irch(括號(hào)里不是鏈接)ina(括號(hào)里不是鏈接).co(括號(hào)里不是鏈接)m.cn(括號(hào)里不是鏈接)/?ci(括號(hào)里不是鏈接)d=(括號(hào)里不是鏈接)GN-buy(括號(hào)里不是鏈接):20130221:SEM:Baidu:CHN:00(括號(hào)里不是鏈接)0120|fc=(括號(hào)里不是鏈接)k91(括號(hào)里不是鏈接)8988499.a151793471.u933021.pb
JAVA訂票系統(tǒng),基于JAVA的訂票系統(tǒng),要求蠻多,求幫忙
如果僅僅是一個(gè)演示系統(tǒng)倒也不復(fù)雜,但是若接近實(shí)際的話,還要考慮并發(fā)排隊(duì)的問題,就會(huì)稍微復(fù)雜些,如果是畢業(yè)設(shè)計(jì)的話,還是建議你自己去完成,讀書的目的就是為了應(yīng)用,其實(shí)讀了幾年書還是紙上談兵,這次的畢業(yè)設(shè)計(jì)倒是非常好的應(yīng)用練習(xí)的機(jī)會(huì),好好把握機(jī)會(huì),否則就枉讀了。
關(guān)于《飛機(jī)訂票系統(tǒng)是實(shí)時(shí)系統(tǒng)嗎》的介紹到此就結(jié)束了。