Create an application to simulate a Train Scheduler

Assignment Help JAVA Programming
Reference no: EM132307337

Project - Linked List Train Application

You're going to create a linked-list and an application to simulate a Train Scheduler.

You're going to have a menu with the following selections:

1) Add a car to the train.

2) Add a car to the back of the train.

3) Add a car to the train at a specific position.

4) Remove the first car from the train.

5) Remove the last car from the train.

6) Remove a car from the train at a specific position.

7) View the train and all of its cars.

8) View all of the removed cars.

9) Remove all of the train's cars.

10) Exit

You're going to create a Node class with the following properties: 

String   cargo 

Node   next          for next node (or what it's pointing to)

If the user asks to add a new car you're going to prompt them for the cargo.

Regardless of where they'd like to add the car. Keep prompting them until they give you a valid string.

When a user asks to add a car to the front then add it to the front.

If they ask to add it to the back then add it to the back. You'll have a method for each of these.

If they ask to add it to a specific position, you're going to list the available choices for them. So, if there are three cars and they select the menu option 2 for adding it to a specific location you're going to ask them if they'd like to add from 0 to 4. One would be in front of the head car. 2 would be in between the first and second car. 3 would be in between the second and third car. And 4 would be at the back. If they choose anything else then keep prompting them until they enter a correct position.

You will then add accordingly. So, a 1 would again call the method to add to the head. A 4 (or whatever the last position is) would call the method to add it to the back of the train. Otherwise you'll add it at the position they are asking for.

Same with removal. Remove from front, Remove from back, Remove from position. When you remove the car you're going to add it to a second linkedlist called removedCars. Don't worry about positioning, just add them to the back.

The view the train will display all of the cars with their cargo and position in a neatly formatted way.

The view removed cars will display all of the removed cars and their cargo, not position.

The empty train selection will remove all of the cars placing them in the removed cars linked-list in order from front to back as they were in the train.

The last selection will exit the program.

Note - This have to be done in Dr.java as well as netbeans.

Attachment:- Assignment File.rar

Reference no: EM132307337

Questions Cloud

Illustrate and verbally express a personal transformation : Multimodal Personal Narrative - Develop a multimodal document to both visually illustrate and verbally express a personal transformation.
Construct a letter focused on persuading the reader : Construct a letter focused on persuading the reader to change his or her stance or opinion.
Write buffer in mmu helps to avoid controller : a) Write buffer in MMU helps to avoid controller stall upon cache miss during write using write through policy
Allow the aggregate of the virtual machines : Does this allow the aggregate of the virtual machines to perform more real work than a physical workload would be capable of on the same hardware?
Create an application to simulate a Train Scheduler : CISS 111 Project - Linked List Train Application. You're going to create a linked-list and an application to simulate a Train Scheduler
What is the total size of cache memory in kb unit : It uses 22-bits TAG and 10-bits 'Ctrl' bits. What is the total size of cache memory in KB unit? Please provide explanation
How would you have defined the term culture : Dr. Banks also names what he calls the five basic types of knowledge. Based on this list, which are the most influential types of knowledge in your opinion? Why
Briefly describe three examples of aristotles golden mean : Would we in the 21st century consider many of the issues of these examples moral issues or merely character development goals?
How many active processes are there at this time : In a computing system deploying virtual memory, there are 1M (2^20) page table entries per process. Each entry has 48 bits

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd