1 Star 0 Fork 0

冷冲/git

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
DatabaseConnector.java 1019 Bytes
一键复制 编辑 原始数据 按行查看 历史
冷冲 提交于 6年前 . chapter15
package src;
public class DatabaseConnector{
final static int POCESS=120;
final static int MAX_CASHERS=10;
final static int NUM_CUSTOMERS=100;
public static void main(String[] args) {
Customer customer;
CircularArrayQueue<Customer> customerQueue =new CircularArrayQueue<Customer>();
int[] cashierTime=new int[MAX_CASHERS];
int totalTime,averageTime,departs;
for(int cashiers=0;cashiers<MAX_CASHERS;cashiers++){
for(int count=0;count<cashiers;count++){
cashierTime[count]=0;
for(int count1=1;count1<NUM_CUSTOMERS;count++){
customerQueue.enqueue(new Customer(count1*15));
}
totalTime=0;
}
}
while (!(customerQueue.isEmpty())){
for(int count=0;count<=MAX_CASHERS;count++){
if(!(customerQueue.isEmpty())){
customer=customerQueue.dequeue();
}
}
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cold_impact/git.git
git@gitee.com:cold_impact/git.git
cold_impact
git
git
master

搜索帮助