import java.util.*;

// TODO getCommand is missing
public class CommandProcessor
{
	/*
		Courtney Karppi
		CISC 370
		April 18, 2015
	*/
	private static 	Map<String,Command>commandRegistry; // TODO static?
	private Command noSuchCommand; 
	private Command nothingEnteredCommand;

	public CommandProcessor(Command noSuchCommand, Command nothingEnteredCommand)
	{
		this.noSuchCommand = noSuchCommand;
		this.nothingEnteredCommand = nothingEnteredCommand;
		// TODO commandRegistry???
	}//CommandProcessor

	//getAllCommands method returns all the commands in the commandRegistry
	public Command[] getAllCommands() // TODO test
	{
		//returns all the commands in the form of a Command[]
		return commandRegistry.values().toArray(new Command[0]);
	}//getAllCommands

	//registers a new command in the commandRegistry
	public void register(Command command) // TODO test
	{
		String commandText;
		commandText = convertToKey(command.getCommandName());

		//checks the parameter to make sure it is not blank or not in the commandRegistry
		if(!(commandText.equals("")||commandRegistry.containsKey(commandText)))
		{
			commandRegistry.put(commandText, command);
		}
	}//register

	//runs the command associated with the parameter
	public void runCommand(String commandText) // TODO what is this?
	{
		Command command;

		//checks to see if the paramter is not blank or already in the commandRegistry
		//if its not then it executes the associated command
		if(!convertToKey(commandText).equals(""))
		{
			command = this.nothingEnteredCommand;
		}
		else if (!commandRegistry.containsKey(convertToKey(commandText)))
		{
			command = this.noSuchCommand;
		}
		else
		{
			command = commandRegistry.get(convertToKey(commandText));
		}
		command.execute();
	}//runCommand

	//Removes the white space from the data and converts it to lower case
	private static String convertToKey(String data)
	{
		return data.trim().toLowerCase();
	}//convertToKey

}//class

@@ -26,29 +26,12 @@
 ODO 
-getCommand is missing
+Test
 %0Apub
@@ -126,16 +126,8 @@
 ate 
-static %09
 Map%3C
@@ -161,24 +161,8 @@
 try;
- // TODO static?
 %0A%09pr
@@ -189,17 +189,16 @@
 Command;
- 
 %0A%09privat
@@ -407,24 +407,21 @@
 mand;%0A%09%09
-// TODO 
+this.
 commandR
@@ -431,11 +431,42 @@
 stry
-???
+ = new HashMap%3CString, Command%3E();
 %0A%09%7D/
@@ -591,29 +591,16 @@
 mmands()
- // TODO test
 %0A%09%7B%0A%09%09//
@@ -822,21 +822,8 @@
 and)
- // TODO test
 %0A%09%7B%0A
@@ -1189,450 +1189,58 @@
 lic 
-void runCommand(String commandText) // TODO what is this?%0A%09%7B%0A%09%09Command command;%0A%0A%09%09//checks to see if the paramter is not blank or already in the commandRegistry%0A%09%09//if its not then it executes the associated command%0A%09%09if(!convertToKey(commandText).equals(%22%22))%0A%09
+Command getCommand(String commandText)%0A
 %09%7B%0A%09%09
-%09
-command = this.nothingEnteredCommand;%0A%09%09%7D%0A%09%09else if (!commandRegistry.containsKey(convertToKey(commandText)))%0A%09%09%7B%0A%09%09%09command = this.noSuchCommand;%0A%09%09%7D%0A%09%09else%0A%09%09%7B%0A%09%09%09command =
+return
  com
@@ -1289,39 +1289,14 @@
 );%0A%09
-%09%7D%0A%09%09command.execute();%0A%09%7D//run
+%7D//get
 Comm

Update CommandProcessor.java