问题描述
请问大家谁有用java开发的网上客房预订系统,酒店客房预订系统,有的麻烦共享下,很急,做毕设,一点头绪都没有,谢谢大家了
解决方案
解决方案二:
你找到网上客房预订了吗??我也要·~~~急死了
解决方案三:
都两年了,还没有人回复,哎
解决方案四:
每年快毕业的时候都这样子的。
解决方案五:
packageday06.hotel_management;importjava.util.Scanner;publicclassHotel{privateStringname;privateStringaddress;privateRoom[][]rooms;publicHotel(Stringname,Stringaddress){this.name=name;this.address=address;rooms=newRoom[12][10];for(inti=0;i<rooms.length;i++){for(intj=0;j<rooms[i].length;j++){rooms[i][j]=newRoom((i+1)*100+(j+1));}}}publicvoidstart(){System.out.println(name+"欢迎您!"+"["+address+"]");Scannersca=newScanner(System.in);while(true){System.out.print("请输入命令:");Stringcomm=sca.next();if(comm.equalsIgnoreCase("search")){search();}elseif(comm.equalsIgnoreCase("in")){Stringname=sca.next();intid=sca.nextInt();in(id,name);}elseif(comm.equalsIgnoreCase("out")){intid=sca.nextInt();out(id);}elseif(comm.equalsIgnoreCase("quit")){System.out.println("GOODBYE!");break;}else{System.out.println("错误的命令,请重新输入!");}}}privatevoidsearch(){for(inti=0;i<rooms.length;i++){for(intj=0;j<rooms[i].length;j++){System.out.print((i+1)*100+(j+1)+"t");}System.out.println();for(intj=0;j<rooms[i].length;j++){System.out.print((rooms[i][j].isEmpty()?"EMPTY":rooms[i][j].getGuestName())+"t");}System.out.println();System.out.println();}}privatevoidin(intid,Stringname){inti=id/100-1;intj=id%100-1;if(rooms[i][j].in(name)){System.out.println(name+"入住"+id+"房间!");}else{System.out.println(name+"入住失败!");}}privatevoidout(intid){inti=id/100-1;intj=id%100-1;if(rooms[i][j].out()){System.out.println(id+"退房成功!");}else{System.out.println(id+"退房失败!");}}publicstaticvoidmain(String[]args){Hotelh=newHotel("中国大酒店8");h.start();}}