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(); } }