Question: run(int stops, ArrayList custList): 1. Create an instance of Train and pass through constructor stops and custList 2. Call Train's simulate method 3. Call Train's

 run(int stops, ArrayList custList): 1. Create an instance of Train and

run(int stops, ArrayList custList): 1. Create an instance of Train and pass through constructor stops and custList 2. Call Train's simulate method 3. Call Train's displayStops method main() method: 1. Creates an instance of Simulation class 2. Creates custList of type ArrayList and assigns null 3. Calls Simulator's getStopsFromUser() method and saves the return value in variable (stops) 4. Loops as long as custList is null a. Calls Simulator's getInputFile() method. Save the returned File instance b. Call Simulator's checkFile() method passing it stops and instance of File. Save returned value in custList 5. Call Simulator's run method passing it the stops and custList

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!