Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help Please! Need help with this Java assignment, I am beyond lost! Any help is greatly appreaciated Assignment Description This assignment provides more practice creating

Help Please! Need help with this Java assignment, I am beyond lost!

Any help is greatly appreaciated

image text in transcribedimage text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Assignment Description This assignment provides more practice creating and manipulating classes and interfaces as well as the opportunity to implement and use the Comparable and Iterator interfaces. For this assignment, create a program that simulates a simple railroad yard. Although railroad yards are generally divided into several different types of yards, your railroad yard will consist of only one sorting yard with the number of tracks specified in the sortingYardTrains.txt file To setup the sorting yard, read the number of tracks from the file and create the sorting yard. Next, for each train in the file, read its details and place the train in the sorting yard on its specified track. The number of trains could be less than the number of tracks in the sorting yard, so some tracks could be empty. Empty tracks can be at any location, for example, tracks 3, 7, and 8 are empty in the test file. After all trains are placed into the sorting yard, print an outbound report for each train. This report must be ordered from shortest train to longest train. rain For this assignment, assume there is only one engine. Railroad yard A system of tracks where rail cars are loaded and unloaded, sorted, and assembled into trains. Many yards are subdivided into receiving, sorting, and departure yards Each of these yards contain parallel train tracks used to keep rail cars off the mainline . . . Outbound Report Report maintained by the railroad yard for each outbound train. Specifications 1. Create a Java class called UsernameAssignment4 2. Follow "CS1450 Programming Assignments Policy" 3. Write a test program (i.e. main) to do the following: . Step 1: Create a railroad yard object . Contains a sorting yard (array) with the number of tracks read from file Step 2: Read train details from file and create trains. Add train to the railroad's sorting yard . e For each train in the file o Create a train object using the information in the file o Store train in sorting yard on track specified in the file o Use addTrainToSortingYard method on railroad yard Print sorting track # and train details after train is placed in sorting yard Use print method on train (see example output below) o o Assignment Description This assignment provides more practice creating and manipulating classes and interfaces as well as the opportunity to implement and use the Comparable and Iterator interfaces. For this assignment, create a program that simulates a simple railroad yard. Although railroad yards are generally divided into several different types of yards, your railroad yard will consist of only one sorting yard with the number of tracks specified in the sortingYardTrains.txt file To setup the sorting yard, read the number of tracks from the file and create the sorting yard. Next, for each train in the file, read its details and place the train in the sorting yard on its specified track. The number of trains could be less than the number of tracks in the sorting yard, so some tracks could be empty. Empty tracks can be at any location, for example, tracks 3, 7, and 8 are empty in the test file. After all trains are placed into the sorting yard, print an outbound report for each train. This report must be ordered from shortest train to longest train. rain For this assignment, assume there is only one engine. Railroad yard A system of tracks where rail cars are loaded and unloaded, sorted, and assembled into trains. Many yards are subdivided into receiving, sorting, and departure yards Each of these yards contain parallel train tracks used to keep rail cars off the mainline . . . Outbound Report Report maintained by the railroad yard for each outbound train. Specifications 1. Create a Java class called UsernameAssignment4 2. Follow "CS1450 Programming Assignments Policy" 3. Write a test program (i.e. main) to do the following: . Step 1: Create a railroad yard object . Contains a sorting yard (array) with the number of tracks read from file Step 2: Read train details from file and create trains. Add train to the railroad's sorting yard . e For each train in the file o Create a train object using the information in the file o Store train in sorting yard on track specified in the file o Use addTrainToSortingYard method on railroad yard Print sorting track # and train details after train is placed in sorting yard Use print method on train (see example output below) o o

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

Students also viewed these Databases questions

Question

Brief the importance of span of control and its concepts.

Answered: 1 week ago

Question

What is meant by decentralisation?

Answered: 1 week ago

Question

Write down the Limitation of Beer - Lamberts law?

Answered: 1 week ago

Question

Discuss the Hawthorne experiments in detail

Answered: 1 week ago

Question

Explain the characteristics of a good system of control

Answered: 1 week ago