You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

18 lines
447 B

package com.crawler.command;
import java.util.Scanner;
public abstract class BaseCommand implements Command {
protected Scanner scanner;
protected CommandHistory history;
public BaseCommand() {
this.scanner = new Scanner(System.in);
this.history = CommandHistory.getInstance();
}
protected String readInput(String prompt) {
System.out.print(prompt);
return scanner.nextLine().trim();
}
}