Generated Class SystemInput. Edited Main class. Generated 2 more MarkDown Files
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import java.util.Scanner;
|
||||
|
||||
public class SystemInput {
|
||||
|
||||
private Scanner scanner;
|
||||
|
||||
public SystemInput() {
|
||||
scanner = new Scanner("");
|
||||
}
|
||||
|
||||
/**
|
||||
* Method: CheckForInput
|
||||
*/
|
||||
public String[] checkForInput() {
|
||||
|
||||
return new String[] {
|
||||
"Test"
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
+26
-3
@@ -1,8 +1,31 @@
|
||||
public class TextEditor {
|
||||
|
||||
private SystemInput sysInput;
|
||||
private Text text;
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
|
||||
TextEditor t = new TextEditor();
|
||||
}
|
||||
|
||||
public TextEditor() {
|
||||
sysInput = new SystemInput();
|
||||
text = new Text();
|
||||
String command[];
|
||||
|
||||
do {
|
||||
command = sysInput.checkForInput();
|
||||
|
||||
switch (command[0]) {
|
||||
case "ADD":
|
||||
break;
|
||||
case "REMOVE":
|
||||
break;
|
||||
default:
|
||||
System.out.println("Command not found. Try again");
|
||||
break;
|
||||
}
|
||||
|
||||
} while ("exit".equals(command[0]));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user