import java.util.Scanner;
class pro{
String name;
int arrTime;//到達時間
int workTime;//運行時間
double startTime;//開始服務時間
double finshTime;//結束時間
double cyclingTime;//周轉時間
double weightTime;//帶權周轉時間
boolean finish;
public pro() {}
public pro(String name,int aT,int wT) {
this.name=name;
this.arrTime=aT;
this.workTime=wT;
finish=false;
}
}
public class ProcsssClass {
public static void main(String[] args) {
// TODO Auto-generated method stub
pro[] pro1=new pro[5];
Scanner scan=new Scanner(System.in);
System.out.print("請輸入到達時間:");
for(int i=0;i<5;i++) {
pro1[i]=new pro();
pro1[i].arrTime=scan.nextInt();
}
System.out.print("請輸入服務時間:");
for(int i=0;i<5;i++) {
pro1[i]=new pro();
pro1[i].workTime=scan.nextInt();
}
for(int i=0;i<5;i++) {
System.out.print(pro1[i].arrTime+" ");
}
}
}

uj5u.com熱心網友回復:
在線求,怎么改?轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/284335.html
標籤:Eclipse
下一篇:求助,為什么執行緒中的方法不執行