import java.util.*;



/**
 * 输入数据
 * **/
public class Input {
	
	//输入虚拟节点信息
	public  SeverList input_server()
	{
	    	int server_num;
	    	String host_name=null;
	    	int all_Memory=0;
	    	
	    	Scanner s =new Scanner(System.in);
	    	SeverList serverlist_head = new SeverList(host_name,all_Memory);
	    	SeverList serverlist_list = null;
	    	serverlist_list = serverlist_head;
	    	
	    	System.out.println("请输入虚拟服务器的台数：");
	    	server_num = s.nextInt();
	    	System.out.println("请输入每台虚拟服务器的基本情况");
	    	
	    	
	    	for(int i=0; i<server_num; i++)
	    	{
	    		
	    		System.out.println("请输入第+"+i+"台：");
	    		host_name = s.next("请输入主机名：");
	    		System.out.println("请输入内存大小：");
	    		all_Memory = s.nextInt();
	    		SeverList server_list = new SeverList(host_name,all_Memory);
	    		serverlist_list.setNext(server_list);
	    		serverlist_list = serverlist_list.getNext();
	    	}
	    	return serverlist_head;
	
	}
	//输入任务信息
	public TaskList input_task()
	{
			 int task_num;
			 String taskName=null;
			 int need_Memory=0;
			 int time_ms=0;
			 
			 Scanner s =new Scanner(System.in);
			 TaskList tasklist_head = new TaskList(taskName,need_Memory,time_ms);
			 TaskList tasklist_list = tasklist_head;
			 
			 System.out.println("请输入虚拟任务的个数：");
			 task_num = s.nextInt();
	    	 System.out.println("请输入虚拟任务的基本情况");
	    	
	    	
	    	for(int i=0; i<task_num; i++)
	    	{
	    		
	    		System.out.println("请输入第+"+i+"个任务：");
	    		taskName = s.next("请输入任务名：");
	    		System.out.println("请输入任务需要内存大小：");
	    		need_Memory = s.nextInt();
	    		System.out.println("请输入任务需要时间大小ms：");
	    		time_ms = s.nextInt();
	    		TaskList tasklist = new TaskList(taskName,need_Memory,time_ms);
	    		tasklist_list.setNext(tasklist);
	    		tasklist_list = tasklist_list.getNext();
	    	}
	    	
	    	 return tasklist_head;
	}
}
