package com.example.datacollect.command; import com.example.datacollect.model.Article; import com.example.datacollect.view.ConsoleView; import java.util.List; /** * 查看历史命令 */ public class History implements Command { private HistoryCommand historyCommand; public History(HistoryCommand historyCommand) { this.historyCommand = historyCommand; } @Override public String getName() { return "history"; } @Override public void execute(String[] args, List
articles) { ConsoleView view = new ConsoleView(); historyCommand.showHistory(view, articles); } }