import java.util.ArrayList ;


public class System {
    private ArrayList<Flight> flights ;


    public System(ArrayList<Flight> flights){
        this.flights = flights ;
    }

    public void addFlight(Flight flight){
        this.flights.add(flight) ;
    }

    public void removeFlight(Flight flight){
        this.flights.remove(flight) ;
    }

    public ArrayList<Flight> getFlights() {
        return flights;
    }

    public void reserve(Flight flight , Seat seat , Customer customer) {
        for (Flight f : flights
        ) {
            if (f == flight) {
                f.reserve(seat , customer);
            }
        }
    }

}
