JAVA 利用集合模拟餐厅打饭

JAVA 利用集合模拟餐厅打饭

import java.util.*;
public class OrderAtMess {
	static int k;
	static String[] OrderMan;
	public static void main(String[] args) {
		k = (int)(Math.random()*100)/3;
		OrderMan = new String[k];
		System.out.println("已有"+k+"人点餐");
		Collection a = new ArrayList();
		InitializeString(a);		//初始化已点餐人员
		if(!a.isEmpty())
			TakeFood(a);		
	}
	private static void TakeFood(Collection a) {
		int i;
		for(i=0;i a) {
		int i=-1;
		for(i=0;i a) {
		int i=0;
		while(i

你可能感兴趣的:(java作业)