Added commands as cases.
This commit is contained in:
parent
812ec1d388
commit
4db62b1848
|
@ -1,3 +1,5 @@
|
|||
import java.util.ArrayList;
|
||||
|
||||
public class TextEditor {
|
||||
|
||||
private SystemInput sysInput;
|
||||
|
@ -18,14 +20,30 @@ public class TextEditor {
|
|||
switch (command[0]) {
|
||||
case "ADD":
|
||||
break;
|
||||
case "REMOVE":
|
||||
case "DEL":
|
||||
break;
|
||||
case "DUMMY":
|
||||
text.dummy();
|
||||
break;
|
||||
case "EXIT":
|
||||
break;
|
||||
case "FORMAT RAW":
|
||||
break;
|
||||
case "FORMAT FIX":
|
||||
break;
|
||||
case "INDEX":
|
||||
ArrayList<String> index = text.index();
|
||||
break;
|
||||
case "PRINT":
|
||||
break;
|
||||
case "REPLACE":
|
||||
break;
|
||||
default:
|
||||
System.out.println("Command not found. Try again");
|
||||
break;
|
||||
}
|
||||
|
||||
} while ("exit".equals(command[0]));
|
||||
} while ("EXIT".equals(command[0]));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue