FedExPlanes7.txt 1 medical 111 Boeing767 120000 London 3 packages 555 MD11 180000 Barcelona 4 animals 444 MD11 30000 Miami 6 animals 333 Boeing757 60000 Jackson 7 packages 666 Boeing777 230000 Seattle 9 medical 222 Boeing767 100000 Frankfurt 10 packages 777 Boeing757 90000 Austin FedExTrucks7.txt 1 688 Memphis 3 820 Denver 4 728 Dallas Assignment4.java import java.util.*; import java.io.*; public class Assignment4 { public static void main(String[] args) throws IOException { //creates plane & truck file objs + cargo terminal Scanner planeFile = new Scanner(new File("FedExPlanes.txt")); Scanner truckFile = new Scanner(new File("FedExTrucks.txt")); CargoTerminal terminal = new CargoTerminal(truckFile.nextInt(), planeFile.nextInt()); //add semiTrucks into terminal System.out.println("Loading semi-trucks and planes into cargo terminal...\n"); while(truckFile.hasNext()) { int dock = truckFile.nextInt(); int number = truckFile.nextInt(); String destination = truckFile.next(); terminal.addSemiTruck(dock, new SemiTruck(number, destination)); } truckFile.close(); //add planes into terminal while(planeFile.hasNext()) { int stand = planeFile.nextInt(); int flight = planeFile.nextInt(); String type = planeFile.next(); double capacity = planeFile.nextDouble(); String destination = planeFile.next(); terminal.addCargoPlane(stand, new CargoPlane(flight, type, capacity, destination)); } planeFile.close(); //display planes and trucks terminal.displayTrucksAndPlanes(); //print tarmac report System.out.println("Flight \t\t Stand \t\t Deparing To \t\t Type \t\t Capacity(lbs)\t\t \n" + "---------------------------------------------------------------------------------- ----\n"); printTarmacStatus(terminal); } //status report method for tarmac public static void printTarmacStatus(CargoTerminal terminal) { ArrayList reports = new ArrayList(); for(int i = 0; i < terminal.getNumStands(); i++) { //get plane obj and store vars for report CargoPlane temp; if(terminal.getCargoPlane(i) != null) { temp = terminal.getCargoPlane(i); int flight = temp.getNumber(); String type = temp.getType(); double capacity = temp.getCapacity(); String destination = temp.getDestination(); reports.add(new PlaneReport(i, flight, type, capacity, destination)); } } Collections.sort(reports); for(int i = 0; i < reports.size(); i++) { PlaneReport report = reports.get(i); System.out.println(report.print()); } } } //define printable interface with abstract method interface Printable { public abstract String print(); } //define cargo terminal class class CargoTerminal { private int numberDocks; private int numberStands; private SemiTruck[] loadingDock; private CargoPlane[] tarmac; //define constructor public CargoTerminal(int numberDocks, int numberStands) { this.numberDocks = numberDocks; this.numberStands = numberStands; this.loadingDock = new SemiTruck[numberDocks]; this.tarmac = new CargoPlane[numberStands]; } //define getter methods public int getNumDocks() { return this.numberDocks; } public int.