Skip to content

Instantly share code, notes, and snippets.

Created February 1, 2013 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/afffcce8c81b31c8f1dc to your computer and use it in GitHub Desktop.
Save anonymous/afffcce8c81b31c8f1dc to your computer and use it in GitHub Desktop.
public class Command {
static final int CMD_LET = 0;
static final int CMD_DOC = 1;
static final int CMD_PRINT = 2;
static final int CMD_DO = 3;
static final int CMD_HISTORY = 4;
static final int CMD_END = 5;
String s;
public Command(String s){
this.s = s;
}
public int getCommand(){
if();
return(CMD_LET);
if()
return(CMD_DOC);
if()
return(CMD_PRINT);
if()
return(CMD_DO);
if()
return(CMD_HISTORY);
if()
return(CMD_END);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment