Need help to implement a solution with ArrayLists & Objects
Here's the premise of what I'm trying to do.
I need to write some code that will allow a user to add stops to a route between two places.
For example, a person is travelling from Place A to Place B via a public bus and would like to know at which places the bus is going to stop during the route.
Now an Admin user should be able to add stops within a route and there are multiple places which means multiple routes (Place A to B, A to C, B to D, D to C, etc).
I know that for a route I will need to create an ArrayList which will hold all of the stops but the issue I'm having is figuring out how to create a new ArrayList for each route.
In the program, the user will input their start place and then their end place and any stops will be returned. For an Admin user, they will also input a start place and end place but then add stops so when a regular user checks a route between two places, stop that have been added will be displayed.
Any ideas of how I could implement this?
Like I said, I know that I will need ArrayLists but I am not sure how to implement this for multiple routes created on the fly.
Re: Need help to implement a solution with ArrayLists & Objects