Hi;
I do not know why I can not access your code even though I've solved this exercise, "access is denied". However I'll give you some valuable hints:
1- Make sure to make the airplane class and the flight class so simple; just a couple of instance variables and their getters.
2- Leave the heavy work to the userInterface class where you implement the addAirplane and addFlight etc.
3- You'l have to implement your hashmap planes and hashmap flights in the userInterface.
and know for your question on how-to implement the addFlight method, its better to receive a reader as parmeter, here is an example;
addFlight(Scanner reader) {
// after asking the user to enter the plane id, assign it like this, Airplane plane = planes.get(id);
// then depC
// then desC
// then declare a new flight with these values, Flight flight = new Flight(plane, depC, desC);
// lastly add it to the hashmap; flights.put(flight.toString(), flight);
}
do not forget to override the toString method in an appropriate way.