STUDENT NAME = Adrian Aleksander Buczek
STUDENT ID = 111798
A Java-based train dispatch application for managing train departures in a terminal. The application is set to represent a train station within a 24-hour operational window.
Key functionalities of the application include:
- Displaying departures
- Adding new departures
- Setting the track of a departure
- Setting the delay of a departure
- Searching for departures by a destination
- Searching for a departure by a train number
- Updating the time of day
The source code of the application is housed within the src
directory, which is divided into two main subdirectories:
main/java/edu/ntnu/stud
: This directory contains the Java application's core source files.App.java
: Responsible for launching the application.Registry.java
: Manages the data and operations related to a registry of train departures.TrainDeparture.java
: Represents a train departure with relevant details.UserInterface.java
: Handles the user interaction for managing train departures.
The tests for the application are organized within the src
directory under test
:
test/java/edu/ntnu/stud
: Contains the JUnit-test classes for the application.RegistryTest.java
: Includes tests for the Registry class.TrainDepartureTest.java
: Contains tests for the TrainDeparture class.
Link to repository: https://github.com/derzhi/Train-Dispatch-System
- Java Development Kit (JDK) 1.8 or above must be installed.
- Apache Maven must be installed.
- Open a terminal or command prompt.
- Change the directory to the project root where the
pom.xml
file is located.cd path_to_project_folder
- Use Maven to compile and run the application with the following commands:
mvn clean install mvn exec:java -D"exec.mainClass"="edu.ntnu.stud.App"
This project uses Maven to manage the running of tests, which ensures that any developer can easily run the tests in a consistent environment. To run the tests for the project, you'll need to have Maven installed and configured on your system.
Follow these steps to execute the tests:
- Open a terminal or command prompt.
- Navigate to the root directory of the project where the
pom.xml
file is located. - Run the following command:
mvn test