Archive for June 20th, 2013

Java Program 20 – Flight Management

Program

import java.util.ArrayList;
import java.util.Iterator;
import java.io.*;

class Route{

    String routeId;
    String routeOrigin;
    String routeDestination;
    String routeDate;
}

class Flight{

    String flightId;
    String flightName;
    String flightOrigin;
    String flightDestination;
    String flightDate;
    ArrayList<Route> routeArray=new ArrayList<Route>(10);
}

class FlightManagement{

    ArrayList<Flight> flightArray=new ArrayList<Flight>(10);
    Route route;

    public void addFlight(Flight newFlight){
    
        flightArray.add(newFlight);
    }
    

Read more »

Last updated by at .