第1个回答 2015-10-07
public class IdUtil {
public static void main(String[] args) {
//七天的课程
String[] week = new String[7];
//每天的课程名
week[0] = "语文,语文,语文,语文,语文,语文,语文,语文,语文,语文";
week[1] = "数学,数学,数学,数学,数学,数学,数学,数学,数学,数学";
week[2] = "外语,外语,外语,外语,外语,外语,外语,外语,外语,外语";
week[3] = "物理,物理,物理,物理,物理,物理,物理,寂寞学,物理,物理";
week[4] = "化学,化学,化学,化学,化学,化学,化学,化学,化学,化学";
week[5] = "生物,生物,生物,生物,生物,生物,生物,生物,生物,生物";
week[6] = "寂寞学,寂寞学,寂寞学,寂寞学,寂寞学,寂寞学,寂寞学,寂寞学,寂寞学,寂寞学";
//上课时间
String[] time = {"8:00","9:00","8:00","8:00","8:00","8:00","8:00","8:00","8:00","8:00"};
for(int a=1;a<8;a++){
System.out.print("\t"+"星期"+a);
}
System.out.println();
int b = 0;
for(int i=1;i<11;i++){
switch (i) {
case 1:
System.out.println("上午");
break;
case 5:
System.out.println("下午");
break;
case 9:
System.out.println("晚上");
break;
}
System.out.print(time[i-1]+"\t");
for(int j=0;j<7;j++){
System.out.print(week[j].split(",")[b]+"\t");
}
System.out.println();
b++;
}
}
}本回答被网友采纳