Railroad Yard Simulation Project
VerifiedAdded on 2019/09/19
|2
|974
|444
Project
AI Summary
This project requires the implementation of a railroad yard simulation program in Java. The program takes incoming cars and a desired outgoing order as input. It uses stacks and queues to simulate the movement of cars and determines if the incoming cars can be rearranged to match the desired outgoing order. The program must adhere to specific Java API usage requirements, including the use of Scanner, Stack, Queue, and LinkedList (via the Queue interface). The user inputs cars until 'DONE' is entered, and the program must handle cases where the input does not match the output. The project emphasizes the use of stacks and queues for data storage and manipulation, avoiding arrays. The program should be thoroughly tested with various examples.
1 out of 2


