import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
// Do not change the method
class FacadeMain {
public static void main(String[] args) {
LogSearchFacade logSearcher = new LogSearchFacade(
new LogCollector(), new LogFilter(), new LogFormatter());
List<String> foundLogs = logSearcher.search("ERROR");
for (String log : foundLogs) {
System.out.println(log);
}
}
}
class LogSearchFacade {
private final LogCollector collector;
private final LogFilter filter;
private final LogFormatter formatter;
public LogSearchFacade(LogCollector collector, LogFilter filter, LogFormatter formatter) {
this.collector = collector;
this.filter = filter;
this.formatter = formatter;
}
public List<String> search(String expr) {
// construct the code of the facade method
}
}
// Do not change code below
class LogCollector {
/**