package com.example.datacollect.command; import com.example.datacollect.model.Article; import com.example.datacollect.view.ConsoleView; import java.util.List; public class HistoryCommand implements Command { private final ConsoleView view; private final List history; public HistoryCommand(ConsoleView view, List history) { this.view = view; this.history = history; } @Override public String getName() { return "history"; } @Override public void execute(String[] args, List
articles) { if (history.isEmpty()){ view.printInfo("No command has been executed yet."); } else { view.printInfo("History commands:"); for (int i=0; i