中文字幕伊人,国产一级大片黄,www.五月丁香,一级国厂毛片,www.av有码午夜天堂,77女神黄色网,91黄色视频在线观看20分钟

當(dāng)前位置:  > 飛機(jī)專利

飛機(jī)訂票系統(tǒng)是實(shí)時(shí)系統(tǒng)嗎

作者: 發(fā)布時(shí)間: 2022-10-13 04:02:11

簡(jiǎn)介:】本篇文章給大家談?wù)劇讹w機(jī)訂票系統(tǒng)是實(shí)時(shí)系統(tǒng)嗎》對(duì)應(yīng)的知識(shí)點(diǎn),希望對(duì)各位有所幫助。本文目錄一覽:
1、用Java鏈接mysql數(shù)據(jù)庫(kù)編寫(xiě)一個(gè)簡(jiǎn)單的飛機(jī)票訂票系統(tǒng),大學(xué)作業(yè)級(jí)別,急?。?!

本篇文章給大家談?wù)劇讹w機(jī)訂票系統(tǒng)是實(shí)時(shí)系統(tǒng)嗎》對(duì)應(yīng)的知識(shí)點(diǎn),希望對(duì)各位有所幫助。

本文目錄一覽:

用Java鏈接mysql數(shù)據(jù)庫(kù)編寫(xiě)一個(gè)簡(jiǎn)單的飛機(jī)票訂票系統(tǒng),大學(xué)作業(yè)級(jí)別,急?。。?/h2>

swing 是吧, eclipse中的swing插件可以讓你像在WINFORM中那樣托控件.

但是, 一樓是正解, 這個(gè)需要RMB的.

求java編寫(xiě)簡(jiǎn)單的航空訂票系統(tǒng),不需要用到j(luò)avaweb和數(shù)據(jù)庫(kù) 的代碼,利用文本字節(jié)流的方式存放在文本中

用控制臺(tái)做用戶界面嗎?從控制臺(tái)輸入飛機(jī)批次 然后輸入時(shí)間 然后點(diǎn)擊Enter鍵 信息就應(yīng)該提交到j(luò)ava程序中 并且保存到文本中 然后在輸入查看自己的訂票 然后再提交 就可以看到自己訂的票了 不過(guò)似乎也先需要查詢批次的 查詢的話 就需要把文本的內(nèi)容進(jìn)行分段顯示了

JAVA數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì),航空訂票系統(tǒng)求助

今天比較閑,編了一套,一共4個(gè)class。不懂再問(wèn)。

這格式真要命,湊活看吧。

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ì)的問(wèn)題,就會(huì)稍微復(fù)雜些,如果是畢業(yè)設(shè)計(jì)的話,還是建議你自己去完成,讀書(shū)的目的就是為了應(yīng)用,其實(shí)讀了幾年書(shū)還是紙上談兵,這次的畢業(yè)設(shè)計(jì)倒是非常好的應(yīng)用練習(xí)的機(jī)會(huì),好好把握機(jī)會(huì),否則就枉讀了。

關(guān)于《飛機(jī)訂票系統(tǒng)是實(shí)時(shí)系統(tǒng)嗎》的介紹到此就結(jié)束了。

尚華空乘 - 航空資訊_民航新聞_最新航空動(dòng)態(tài)資訊
備案號(hào):滇ICP備2021006107號(hào)-341 版權(quán)所有:蓁成科技(云南)有限公司    網(wǎng)站地圖
本網(wǎng)站文章僅供交流學(xué)習(xí),不作為商用,版權(quán)歸屬原作者,部分文章推送時(shí)未能及時(shí)與原作者取得聯(lián)系,若來(lái)源標(biāo)注錯(cuò)誤或侵犯到您的權(quán)益煩請(qǐng)告知,我們將立即刪除。