I have been at this literally all day. I can create linked lists no problem and display/delete the data in them. My problem is though that I am not sure how to create a linked list of flights with each node including a reference to a linked list of passengers? This is an assignment in my advanced Algorithms class. I am drawing a blank here?
Share
Create an object that holds a Passenger:
Then give Flight a List of Passengers:
Now you can have a List of Flights:
You needs lots more code in each. Be sure to override equals and hashCode for Passenger and Flight to make sure that they work properly.