电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

停车场管理系统

停车场管理系统_第1页
1/12
停车场管理系统_第2页
2/12
停车场管理系统_第3页
3/12
import java.io.*;public class Method{private int intinput() throws IOException,NumberFormatException{BufferedReader br=new BufferedReader(new InputStreamReader(System.in));String str=br.readLine();int i=Integer.parseInt(str);return i;}private String stringinput() throws IOException{BufferedReader br=new BufferedReader(new InputStreamReader(System.in));String str=br.readLine();return str;}private boolean between(int n,int min,int max){for(int i=min;i<=max;i++)if(n==i)return true;return false;}private void printerror(){System.out.println("输入错误!请重新输入!");}String sip(){String str;while(true){try{str=this.stringinput();}catch(IOException e){this.printerror();continue;}break;}return str;}int iip(int min,int max){int n=0;while(true){try{n=this.intinput();}catch(IOException e) { this.printerror(); continue; } catch(NumberFormatException e) { this.printerror(); continue; } if(!this.between(n,min,max)) { this.printerror(); continue; } break;}return n;}}public class Car {String car_no;String state;Car(){car_no=null;state=null;}}public class Stop {Car data[];int size;Stop(){data=new Car[1];size=0;}private Car peek(){return data[size-1];}private boolean isFull(){return size==data.length;}private Car pop(){size--;return data[size];}void pop(int location,Passway p,Temp t) {if(location==this.size){System.out.println(this.peek().car_no+"号车离开停车场");this.pop();}else{int f=this.size;for(int i=1;i<=f-location;i++){t.push(this.peek());this.pop();}System.out.println(this.peek().car_no+"号车离开停车场");this.pop();for(int i=0;!t.isEmpty();i++){this.push(t.peek());t.pop();}}if(!p.isEmpty()) {this.push(p.data[p.front]);p.remove();}}void push(Car target){if(this.isFull())stretch();data[size]=target;size++;target.state=target.car_no+"号车位于停车场"+size+"号位";System.out.println(target.car_no+"号车进入停车场"+size+"号位");}boolean isIn(String s){if(size==0)return false;for(int i=0;i...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

停车场管理系统

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部