GithubHelp home page GithubHelp logo

erikbjo / tds Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 241 KB

Train Dispatch System to manage train departures. Exam project for IDATG1003.

License: Apache License 2.0

Java 100.00%
cli derby java maven spring-boot spring-cli

tds's Introduction

Train Dispatch System πŸš‚

Java shield Maven shield Spring boot shield IDE

Project description πŸ“

Train Dispatch System is a Java application made to manage train departures. The application is made with Spring Boot and Maven, and uses Derby as a database. The user-interface is made with Spring Shell. Exam project for the course IDATG1003 at NTNU GjΓΈvik.

The project is finished and archived.

How to run the project πŸš€

  1. Clone the repository with:
git clone [email protected]:erikbjo/tds.git
  1. Run the program with:
./mvnw clean spring-boot:run

or

  1. Download the jar file from git releases
  2. Run the program with:
java -jar tds-3.jar

How to run the tests πŸ§ͺ

  1. Clone the repository
  2. Run the tests with:
./mvnw clean test

How to use the program πŸ–₯

When the program is running, you can use the following command to get help:

help

Contact πŸ“§

If you have any questions, you can contact me here

Project structure πŸ“

root
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ main
β”‚   β”‚   β”œβ”€β”€ java
β”‚   β”‚   β”‚   └── no
β”‚   β”‚   β”‚       └── ntnu
β”‚   β”‚   β”‚           └── erbj
β”‚   β”‚   β”‚               └── tds
β”‚   β”‚   β”‚                   β”œβ”€β”€ dao
β”‚   β”‚   β”‚                   β”‚   β”œβ”€β”€Dao.java
β”‚   β”‚   β”‚                   β”‚   β”œβ”€β”€DepartureDao.java
β”‚   β”‚   β”‚                   β”‚   β”œβ”€β”€StationDao.java
β”‚   β”‚   β”‚                   β”‚   β”œβ”€β”€TrainDao.java
β”‚   β”‚   β”‚                   β”‚   └──WagonDao.java
β”‚   β”‚   β”‚                   β”‚
β”‚   β”‚   β”‚                   β”œβ”€β”€ model
β”‚   β”‚   β”‚                   β”‚   β”œβ”€β”€ departures
β”‚   β”‚   β”‚                   β”‚   β”‚   β”œβ”€β”€ Departure.java
β”‚   β”‚   β”‚                   β”‚   β”‚   └── DepartureBuilder.java
β”‚   β”‚   β”‚                   β”‚   β”‚
β”‚   β”‚   β”‚                   β”‚   β”œβ”€β”€ Station.java
β”‚   β”‚   β”‚                   β”‚   β”œβ”€β”€ Train.java
β”‚   β”‚   β”‚                   β”‚   β”œβ”€β”€ Wagon.java
β”‚   β”‚   β”‚                   β”‚   └── WagonType.java
β”‚   β”‚   β”‚                   β”‚
β”‚   β”‚   β”‚                   β”œβ”€β”€ shared
β”‚   β”‚   β”‚                   β”‚   └── utilites
β”‚   β”‚   β”‚                   β”‚       β”œβ”€β”€ StringValidator.java
β”‚   β”‚   β”‚                   β”‚       └── TimeParser.java
β”‚   β”‚   β”‚                   β”‚
β”‚   β”‚   β”‚                   β”œβ”€β”€ ui
β”‚   β”‚   β”‚                   β”‚   β”œβ”€β”€ commands
β”‚   β”‚   β”‚                   β”‚   β”‚   β”œβ”€β”€ CreateCommands.java
β”‚   β”‚   β”‚                   β”‚   β”‚   β”œβ”€β”€ DepartureCommands.java
β”‚   β”‚   β”‚                   β”‚   β”‚   β”œβ”€β”€ HelperCommands.java
β”‚   β”‚   β”‚                   β”‚   β”‚   β”œβ”€β”€ TimeCommands.java
β”‚   β”‚   β”‚                   β”‚   β”‚   β”œβ”€β”€ TrainCommands.java
β”‚   β”‚   β”‚                   β”‚   β”‚   └── WagonCommands.java
β”‚   β”‚   β”‚                   β”‚   β”‚
β”‚   β”‚   β”‚                   β”‚   β”œβ”€β”€ controllers
β”‚   β”‚   β”‚                   β”‚   β”‚   └── TimeController.java
β”‚   β”‚   β”‚                   β”‚   β”‚
β”‚   β”‚   β”‚                   β”‚   └── utilites
β”‚   β”‚   β”‚                   β”‚       β”œβ”€β”€ AnsiColors.java
β”‚   β”‚   β”‚                   β”‚       β”œβ”€β”€ Colorize.java
β”‚   β”‚   β”‚                   β”‚       β”œβ”€β”€ Printer.java
β”‚   β”‚   β”‚                   β”‚       β”œβ”€β”€ SortUtility.java
β”‚   β”‚   β”‚                   β”‚       β”œβ”€β”€ TablePrinter.java
β”‚   β”‚   β”‚                   β”‚       └── TdsLogger.java
β”‚   β”‚   β”‚                   β”‚
β”‚   β”‚   β”‚                   └── TdsApplication.java (main class)
β”‚   β”‚   └── resources
β”‚   β”‚       β”œβ”€β”€ logback.xml
β”‚   β”‚       └── application.properties
β”‚   β”‚
β”‚   └── test
β”‚       └── java
β”‚           └── no
β”‚               └── ntnu
β”‚                   └── erbj   
β”‚                       └── tds
β”‚                           └── model
β”‚                               β”œβ”€β”€ DepartureBuilderTest.java
β”‚                               β”œβ”€β”€ DepartureTest.java
β”‚                               β”œβ”€β”€ StationTest.java
β”‚                               β”œβ”€β”€ TrainTest.java
β”‚                               └── WagonTest.java
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
β”œβ”€β”€ mvnw
β”œβ”€β”€ mvnw.cmd
β”œβ”€β”€ pom.xml
└── README.md

Troubleshooting πŸ› 

If you get any persistence errors, try to delete the tdsDB directory and run the program again.

tds's People

Contributors

erikbjo avatar github-classroom[bot] avatar

tds's Issues

Lage Informasjonstavlen

Du velger selv hvordan du vil presentere din informasjonstavle (tilsvarende den i Figur 1), men
tavlen skal vise fΓΈlgende informasjon (i fΓΈlgende rekkefΓΈlge):
β€’ Avgangstid pΓ₯ formatet "hh:mm"
β€’ Linje
β€’ Tognummer
β€’ Destinasjon
β€’ Eventuell forsinkelse. Hvis ingen forsinkelse skal det ikke vises noe (heller ikke "00:00")
β€’ Spor. Hvis ingen spor tildelt, skal ingen ting vises.

fix departure table, see desc

Time=00:01, should be 20:12 or 20:13
INFO : +----------+------------+------------+----------------+------------------------------------------+
INFO : | Time | Line | Track | Train number | Destination |
INFO : +----------+------------+------------+----------------+------------------------------------------+
INFO : | 00:01 | L312 | 3 | 123 | GjΓΈvik |
INFO : +----------+------------+------------+----------------+------------------------------------------+

exit at wrong time, see desc

shell:>new departure
INFO : +-----------------+------------+------------------------------------------+
INFO : | Train number | Seats | Wagons |
INFO : +-----------------+------------+------------------------------------------+
INFO : | 932 | 0 | 0 |
INFO : | 3212 | 0 | 0 |
INFO : +-----------------+------------+------------------------------------------+
INFO : Enter train number:
032
INFO : Exiting object creation.

Should say "No train with that number blabla try again, exit to exit"

did not catch invalid train, see desc

shell:>new departure
INFO : +-----------------+------------+------------------------------------------+
INFO : | Train number | Seats | Wagons |
INFO : +-----------------+------------+------------------------------------------+
INFO : | 3212 | 0 | 0 |
INFO : +-----------------+------------+------------------------------------------+
INFO : Enter train number: (exit to cancel)
0321321
INFO : Train is occupied or invalid. Please try again.
INFO : Enter train number: (exit to cancel)
123
INFO : Train is occupied or invalid. Please try again.
INFO : Enter departure time (HH:mm):

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.