This repository contains the source code for the CPT204 CW3, including the route planning system and the sorting algorithm benchmarking.
To review the detailed structure of the project, or the design decisions made, please refer to the report and the presentation slides.
- JDK 17 or higher
This project uses Java 16+ features, such as instanceof and .toList(), so make sure you have the correct version of
Java installed. The recommended JDK is Microsoft JDK
or Tencent Kona JDK.
.
├── common
│ └── io
│ ├── CsvReader.java
│ └── SystemIO.java
├── META-INF
│ ├── MANIFEST1.MF
│ └── MANIFEST2.MF
├── task1
│ ├── algorithm
│ │ ├── impl
│ │ │ ├── DijkstraAlgorithm.java
│ │ │ └── DijkstraPathAlgorithm.java
│ │ └── IGraphAlgorithm.java
│ ├── controller
│ │ └── Task1Controller.java
│ ├── exception
│ │ └── NoRouteException.java
│ ├── io
│ │ ├── AttractionReader.java
│ │ └── RoadReader.java
│ ├── model
│ │ ├── impl
│ │ │ ├── City.java
│ │ │ ├── CityGraph.java
│ │ │ ├── Road.java
│ │ │ └── Route.java
│ │ ├── IEdge.java
│ │ ├── IGraph.java
│ │ ├── INode.java
│ │ ├── IPath.java
│ │ └── PathFactory.java
│ ├── util
│ │ └── ListUtil.java
│ └── Main.java ← CLI application of task 1
└── task2
├── algorithm
│ ├── impl
│ │ ├── InsertionSortAlgorithm.java
│ │ ├── MergeSortAlgorithm.java
│ │ └── QuickSortAlgorithm.java
│ └── ISortAlgorithm.java
├── controller
│ └── Task2Controller.java
├── io
│ └── ListReader.java
└── Main.java ← CLI application of task 2
To run the project, you need to compile the Java files and run the Main.java file in either task1 or task2
directory. The project is structured into two main tasks, each with its own set of classes and functionalities.
Also, you can directly run the JAR file in the release using the command below:
java -jar CPT204-CW3-task1.jar
java -jar CPT204-CW3-task2.jar