資源簡介
包含源代碼和實驗報告
排隊系統仿真實驗報告
一個聯通營業廳,9:00到18:00營業。客戶首先要通過取票系統拿到自己的號,先在等待區等待叫號系統報自己的號。一共有2個服務臺,2個服務臺同時工作,哪個服務臺叫到幾號,拿這個號碼的人就去哪個服務臺,叫號系統按順序叫號,2個服務臺叫號不會發生重復現象。............................

代碼片段和文件信息
package?fangzhen;
import?java.util.ArrayList;
import?java.util.List;
//控制臺表格形式輸出
public?class?ConsoleTable?{
private?List?rows?=?new?ArrayList();
private?int?colum;
private?int[]?columLen;
private?static?int?margin?=?2;
public?ConsoleTable(int?colum)?{
this.colum?=?colum;
this.columLen?=?new?int[colum];
}
public?void?appendRow()?{
List?row?=?new?ArrayList(colum);
rows.add(row);
}
public?ConsoleTable?appendColum(object?value)?{
if?(value?==?null)?{
value?=?“NULL“;
}
List?row?=?rows.get(rows.size()?-?1);
row.add(value);
int?len?=?value.toString().getBytes().length;
if?(columLen[row.size()?-?1]? columLen[row.size()?-?1]?=?len;
return?this;
}
public?String?toString()?{
StringBuilder?buf?=?new?StringBuilder();
int?sumlen?=?0;
for?(int?len?:?columLen)?{
sumlen?+=?len;
}
for?(int?ii?=?0;?ii? List?row?=?rows.get(ii);
for?(int?i?=?0;?i? String?o?=?““;
if?(i? o?=?row.get(i).toString();
buf.append(‘|‘).append(printChar(‘?‘?margin)).append(o);
buf.append(printChar(‘?‘?8?-?o.getBytes().length));
}
buf.append(“|\n“);
buf.append(“|“).append(printChar(‘-‘?76)).append(“|“);
}
return?buf.toString();
}
private?String?printChar(char?c?int?len)?{
StringBuilder?buf?=?new?StringBuilder();
for?(int?i?=?0;?i? buf.append(c);
}
return?buf.toString();
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????65815??2017-09-18?17:32??排隊系統\實驗報告.docx
?????文件????????232??2017-05-22?20:30??排隊系統\代碼實現\.classpath
?????文件??????????0??2017-05-24?22:09??排隊系統\代碼實現\.me
?????文件???????4714??2017-05-24?22:09??排隊系統\代碼實現\.me
?????文件?????????20??2017-05-24?22:11??排隊系統\代碼實現\.me
?????文件?????????32??2017-05-24?22:11??排隊系統\代碼實現\.me
?????文件????????560??2017-05-24?22:11??排隊系統\代碼實現\.me
?????文件????????235??2017-05-24?22:13??排隊系統\代碼實現\.me
?????文件??????????1??2017-05-24?22:14??排隊系統\代碼實現\.me
?????文件????????151??2017-05-24?22:14??排隊系統\代碼實現\.me
?????文件??????????1??2017-05-24?22:14??排隊系統\代碼實現\.me
?????文件????????185??2017-05-24?22:14??排隊系統\代碼實現\.me
?????文件????????865??2017-05-24?22:14??排隊系統\代碼實現\.me
?????文件?????????42??2017-05-24?22:10??排隊系統\代碼實現\.me
?????文件?????????87??2017-05-24?22:09??排隊系統\代碼實現\.me
?????文件????????517??2017-05-24?22:14??排隊系統\代碼實現\.me
?????文件?????????58??2017-05-24?22:09??排隊系統\代碼實現\.me
?????文件?????????73??2017-05-24?22:14??排隊系統\代碼實現\.me
?????文件?????????62??2017-05-24?22:09??排隊系統\代碼實現\.me
?????文件?????????97??2017-05-24?22:09??排隊系統\代碼實現\.me
?????文件????????243??2017-05-24?22:14??排隊系統\代碼實現\.me
?????文件????????145??2017-05-24?22:10??排隊系統\代碼實現\.me
?????文件????????100??2017-05-24?22:10??排隊系統\代碼實現\.me
?????文件?????????69??2017-05-24?22:14??排隊系統\代碼實現\.me
?????文件?????????69??2017-05-24?22:14??排隊系統\代碼實現\.me
?????文件????????129??2017-05-24?22:14??排隊系統\代碼實現\.me
?????文件????????371??2017-05-24?22:14??排隊系統\代碼實現\.me
?????文件?????????97??2017-05-24?22:14??排隊系統\代碼實現\.me
?????文件?????????83??2017-05-24?22:09??排隊系統\代碼實現\.me
?????文件????????110??2017-05-24?22:14??排隊系統\代碼實現\.me
............此處省略138個文件信息
- 上一篇:指紋識別系統包含了指紋數據庫 源碼
- 下一篇:超聲波清洗機論文
評論
共有 條評論