This repository contains the final project for the Data Structures and Algorithms course at the University of Ghana . The project involves students from Level 200 and Level 300 working together to design and develop a UG Campus Dispatch System.
# UG Campus Dispatch & Optimization System
> **Ghana Smart Service Operations Optimizer**
> *University of Ghana (Legon) — DSA Semester Project*
A centralized campus mobility and emergency dispatch platform built for the University of Ghana (Legon) campus context. Handles taxi dispatches, priorities emergency and disabled requests, calculates shortest routes (Dijkstra), checks graph reachability (BFS/DFS), and benchmarks algorithm performance.
---
## 🚀 How to Run the App (One-Command Setup)
You can build, setup the database, and launch the application using a single command:
```bash
make run
```
That's it! The system will automatically:
1. Compile all Java source files into `out/`
2. Download/verify the SQLite JDBC driver in `lib/`
3. Initialize the SQLite database (`campus_dispatch.db`) and seed CSV data if not already created
4. Launch the interactive 20-option CLI menu
---
## 🗄️ Database Management Commands
The system uses an embedded SQLite database (`campus_dispatch.db`) backed by baseline CSV data in `data/`:
| Command | Action | Description |
|---------|--------|-------------|
| `make db-init` | Initialize Database | Creates tables and seeds 50 locations, 100 roads, 300 requests, and 30 taxis |
| `make db-reset` | Reset Database | Deletes `campus_dispatch.db` and re-seeds from CSV files |
| `make clean` | Clean Project | Removes compiled `.class` files and the database file |
---
## 💻 All Makefile Commands
```bash
make run # Build project, seed database (if missing), and run application
make run-app # Alias for 'make run'
make db-init # Explicitly run database creation and CSV seed script
make db-reset # Wipe existing database and reload fresh seed data
make build # Compile all Java files into out/ without launching
make clean # Delete out/ directory and campus_dispatch.db
make help # Display Makefile options and guide
```
---
## 📂 Project Structure
```
DSA final project/
├── Makefile # Root …