import java.util.Scanner;
/**
 * The trick to this question is that a Computer object
 * will tell the client whether or not a processor name
 * is valid when the client tries to set the name. The
 * client should not be checking if the processor name
 * is valid; the client should instead delegate to a Computer
 * instance.
 *
 */
public class ComputerClient 
{
	public static void main(String[] args) 
	{
		Computer c = Computer.getRandom();
		String processor = null;
		Scanner kbd = new Scanner(System.in);
		boolean done = false;
		while( !done ) 
		{
			System.out.print("Enter processor name: ");
			processor = kbd.next();
			done = c.setProcessor(processor);
		}
	}

}
