import java.util.*; class Flight { public String origin; public String dest; public String op_unique_carrier; /* other fields from the real data intentionally omitted */ public Flight(String origin, String dest, String op_unique_carrier) { this.origin = origin; this.dest = dest; this.op_unique_carrier = op_unique_carrier; } } class OutputRow { public int competition_factor; public int count; public OutputRow(int competition_factor, int count) { this.competition_factor = competition_factor; this.count = count; } @Override public String toString() { return "(" + competition_factor + ", " + count + ")"; } } public class HW4 { public static List problem2(List flights) { // TODO: your code here return null; } public static void main(String[] args) { List mock_flights = new ArrayList<>(); mock_flights.add(new Flight("SEA", "ORD", "Alaska")); mock_flights.add(new Flight("SEA", "ORD", "United")); mock_flights.add(new Flight("SEA", "ORD", "Delta")); mock_flights.add(new Flight("SEA", "SFO", "Alaska")); mock_flights.add(new Flight("SEA", "SFO", "Delta")); mock_flights.add(new Flight("SFO", "LAX", "Alaska")); mock_flights.add(new Flight("SFO", "LAX", "Delta")); mock_flights.add(new Flight("SFO", "ORD", "United")); mock_flights.add(new Flight("SEA", "JNU", "Alaska")); List output = problem2(mock_flights); for (OutputRow row : output) { System.out.println(row); } } } // Expected output: // // (3, 1) // (2, 2) // (1, 2) // // Your code will be tested on other data, so do not hard code the answer.