← All tools

Chanindhu/airline-route-planner-dsa

Popularity 70 Updated Development & Build

Java command-line airline route planner using BFS, custom hash table, linear probing, and heap sort.

githubauto-collected

Installation

A directly usable install command is not verified yet. Check the project documentation or releases.

Airline Route Planner - Data Structures and Algorithms

A Java command-line airline route planning system built to demonstrate core data structures and algorithms, including graph traversal, custom hash table lookup, queue-based BFS route discovery, and heap sort route ranking.

Overview

This project models an airline network as a directed graph where airports are vertices and flights are weighted edges. Users can add airports, add flight connections, discover available routes between airports, look up airport information, delete airports, and run built-in test cases from an interactive menu.

The project was originally developed as an academic Data Structures and Algorithms assignment and later cleaned, documented, and prepared for portfolio presentation.

Reviewer Quick Scan

  • What it demonstrates: custom data structures, graph traversal, BFS route discovery, hash-table lookup, linear probing, and heap-sort based ranking.
  • Best files to inspect first: src/DSAGraph.java, src/DSAHashTable.java, src/HeapSort.java, and src/TestData.java.
  • How to verify it: compile the Java files, run the menu app, and choose the built-in test case runner.

Features

  • Interactive command-line menu
  • Airport creation and deletion
  • Flight route creation with distance values
  • Route discovery using Breadth-First Search (BFS)
  • Maximum layover constraint for route search
  • Custom hash table for airport lookup
  • Linear probing for collision resolution
  • Heap sort for route ordering
  • Route sorting by total distance or number of layovers
  • Custom linked list and queue implementations
  • Built-in test case runner

Algorithms and Data Structures

| Area | Implementation | |---|---| | Graph representation | Custom adjacency-list graph | | Route discovery | Breadth-First Search (BFS) | | Queue | Custom queue using linked list | | Airport lookup | Custom hash table | | Collision handling | Linear probing | | Route sorting | Heap sort | | List storage | Custom doubly linked list |

Proof and Review Evidence

| Evidence | Where to inspect it | What it proves | |---|---|---| | Graph implementation | src/DSAGraph.java | Airports and routes are modeled with a custom adjacency-list graph. | | Route management | src/AirlineManager.java | Airport creation, route discovery, lookup, sorting, and deletion are coordinated in one service layer. | | Hash table | src/DSAHashTable.java and src/DSAHashEntry.java | Lookup is implemented with a custom hash table and linear probing. | | Queue/list structures | src/DSqQueue.java and src/DSALinkedList.java | BFS support structures are implemented directly rather than relying on collections only. | | Heap sort | src/HeapSort.java | Route ranking has a dedicated sorting implementation. | | Built-in test data | src/TestData.java | The menu includes predefined scenarios for quick review. | | Sample route data | data/airport-routes.csv | Example airport and route information is stored with the repo. |

Project Structure

airline-route-planner-dsa/
|-- src/
|   |-- AirlineManagementSystem.java          # CLI entry point and menu
|   |-- AirlineManager.java                   # Coordinates airports, flights, routes, and sorting
|   |-- DSAGraph.java                         # Custom graph implementation
|   |-- DSAHashEntry.java                     # Hash-table entry model
|   |-- DSAHashTable.java                     # Custom hash table with linear probing
|   |-- DSALinkedList.java                    # Custom linked list
|   |-- DSqQueue.java                         # Queue used by route traversal
|   |-- HeapSort.java                         # Route ranking/sorting implementation
|   |-- RouteNode.java                        # Route result model
|   `-- TestData.java                         # Built-in review/test scenarios

| -- airport-routes.csv # Sample route data |-- .gitignore -- README.md


## Getting Started

### Prerequisites

- Java Development Kit (JDK) 17 or newer
- Terminal or command prompt

Check Java installation: