/*
 * @topic T02405 Assignment a8 -- Airline Flight Schedule demo
 * @brief Result of experimentation with collections in class on Fri, Nov 20, 2012
*/
package airlines;
import java.util.ArrayList;

public class Main {

    public static void main(String[] args) {

        // HORRIFIC HARDCODING *** YOU MUST USE VARIABLES!!
        // I intentionally did not use variables when coding
        // these tests of functionality:

        FlightSchedule schedule = new FlightSchedule();
        if (!schedule.isExistingFlightNumber("DL", 1234)) {
            schedule.addFlight("DL", 1234);
            System.out.println("Added " + "DL" + 1234);
        } else {
            System.out.println("Duplicate number " + "DL" + 1234);
        }

        if (!schedule.isExistingFlightNumber("DL", 555)) {
            schedule.addFlight("DL", 555);
            System.out.println("Added " + "DL" + 555);
        } else {
            System.out.println("Duplicate number " + "DL" + 555);
        }
        schedule.print();

        schedule.updateFlightStatus("DL555", 'C');
        if (schedule.isExistingFlightNumber("DL", 555)) {
            schedule.updateFlightStatus("DL555", 'C');
        }

        ArrayList<Flight> departures = schedule.getSortedDepartures();
        System.out.println( departures );
    }//main
}//class Main

/*
	BUSINESS TIER CLASSES

-------------------------------------------------
FlightScheduleReports
-------------------------------------------------
+flightReport( externalflightNumber : String )
//ordered by the departure time
+departuresReport( airportCode, dayOfWeek )

-------------------------------------------------
FlightSchedule
-------------------------------------------------
-airlines : ArrayList< Airline >
-currentTime : int
// "DL1234" -> flight:
-flightMap : HashMap< String, flight >
+setClock()
+deleteAllRecords()
+addAirline( ... )
+addFlight()
+isExistingFlightNumber() : boolean
+updateFlightStatus()
+getFlight( externalflightNumber ) : Flight
+getSortedDepartures() : Array of Flights -- sorted by departure time

-------------------------------------------------
Flight
-------------------------------------------------
-airlineCode
-flightNumber : int
-status : char
-type : char
-departureInfo : DepartureArrivalInfo
-arrivalInfo : DepartureArrivalInfo
+updateStatus()

-------------------------------------------------
DepartureArrivalInfo
-------------------------------------------------
-dayOfWeek : char // U, M, T, W, R, F, S
-time : int
-airportCode : String
-airportGate

-------------------------------------------------
Airline
-------------------------------------------------
-name
-code
-aircraftModel : String
-aircraftCount : int
-aircraftCapacity...
 
 */