Created a train as a custom doubly linked list where users can add/remove train cars, update products on a specific train, and display information in various formats.
Remember when we used to play with trains/cars (toys)? We used to put stuff on cars and make them travel through the house. It's fun, right? Would you like to play with it again? Well, this project can help you with that. Instead of playing with a physical toy car, this project would allow you to build a text-based train car. Initially, you would have an empty train. There will be a menu listing all the available commands. You can add a custom train car by calling the insert command, where you have to provide information such as the weight and length. After the insertion, you may put products on the train. It can be apples, gold, or even Hydrogen bombs. Of course, if you no longer need a specific train car, you can delete it by moving to that car and calling the remove command. In conclusion, when running this program, you're the God Of Creation, controlling how the train appears.Functionalities of the program:
- Insert train car
- Remove train car
- Move to the previous/next train car
- Update product load
- Search for a specific product
- Display train/manifest
- Remove dangerous cars
- Java JDK 15 or Higher
- Text Editor or IDEs
- Notepad (Worst Case).
- Eclipse
- IntelliJ IDEA
- Visual Studio Code
- Repl.it
Or
Do the following:
- Fork this repository by clicking the Fork button located on the top of the page
- Navigate to "Your Repositories" on GitHub and open the forked repo
- In the terminal, git clone the repo using the URL or SSH key
Or
Do the following in the terminal (the following example is run in the Windows PowerShell):
- Check if Java is installed on your computer
- Check if you can access the Java compiler
- Change the directory to the one that contains your Java files. Let's call this directory "JavaProgram"
- Compile the file you want to execute. Let's call this file "RunMe.java"
- Run the program
C:\Users\anon> java -version
If installed, it should display the Java version. If an error is presented, download Java from Orcale.
C:\Users\anon> javac
It should display some information about the compiler. If not, Follow the steps on this site.
C:\Users\anon> cd JavaProgram
=> C:\Users\anon\JavaProgram>
C:\Users\anon\JavaProgram> javac RunMe.java
This will create the class file "RunMe.class."
C:\Users\anon\JavaProgram> java RunMe.java
Please check the LICENSE.md file for more information.