A full-featured Bus Reservation System — built first in C++, then brought to the web.
BusRoute is a Bus Reservation System built in two stages:
- C++ Console Application — A terminal-based program applying Object-Oriented Programming concepts (classes, inheritance, vectors, arrays) to manage bus routes and seat bookings.
- Web Application — A modern, fully interactive single-page web app that recreates every feature of the C++ version in a premium, responsive UI — complete with real-time seat maps, animated ticket generation, and live search.
Both implementations share the same core logic: create routes, reserve seats, prevent duplicate bookings, and display bus information.
| Feature | C++ App | Web App |
|---|---|---|
| Create bus routes | ✅ | ✅ |
| Reserve seats by passenger name | ✅ | ✅ |
| Interactive seat map (32 seats) | — | ✅ |
| View all available buses | ✅ | ✅ |
| Search / filter buses | — | ✅ |
| Prevent duplicate bus numbers | ✅ | ✅ |
| Prevent double-booking a seat | ✅ | ✅ |
| Display full bus details | ✅ | ✅ (modal) |
| Seat availability progress bar | — | ✅ |
| Booking confirmation ticket | — | ✅ |
| Sample / demo data loader | — | ✅ |
| Mobile responsive layout | — | ✅ |
| Toast notifications | — | ✅ |
Bus-Reservation/
│
├── assets/
│ └── logo.svg # Project logo used in README
│
├── index.html # Web app — HTML structure & views
├── style.css # Web app — complete design system & animations
├── app.js # Web app — all business logic (routing, booking, UI)
│
├── reservation.cpp # C++ console application (original implementation)
│
├── .gitattributes
└── README.md
The web app is a single-page application with four views navigated via a sticky navbar.
| View | Description |
|---|---|
| Home | Hero section, live stats (routes & open seats), feature cards, demo loader |
| All Buses | Searchable grid of all routes with availability bars and "View Seats" modals |
| Reserve | 3-step guided flow: select bus → pick seat from map → enter passenger name |
| Manage | Add new routes via form; view existing routes with seat counts |
- HTML5 — Semantic markup, single-page view routing
- CSS3 — Custom design system, CSS variables, glassmorphism, keyframe animations
- Vanilla JavaScript — All state management, DOM rendering, and booking logic (no frameworks, no dependencies)
- Google Fonts —
Syne(headings) +Inter(body)
No build step needed. Just open the file in any modern browser:
# Option 1 — open directly
start index.html # Windows
open index.html # macOS
# Option 2 — serve with a local dev server (e.g. VS Code Live Server)
# Right-click index.html → "Open with Live Server"Compile using g++:
g++ reservation.cpp -o reservationRun:
# Linux / macOS
./reservation
# Windows
reservation.exe==================================================
BUS RESERVATION SYSTEM
==================================================
1. Create bus route
2. Make reservation
3. Display seats
4. Show all buses
5. Print bus details
6. Exit
BusRoute (base class)
│ busNo, driver, fromPlace, toPlace, arrivalTime, departureTime
│ Default & parameterized constructors
│
└── Bus (derived class)
seats[32] — array tracking passenger names per seat
isSeatBooked(seatNo)
bookSeat(seatNo, name)
displaySeats()
printInfo()
- Classes & Objects —
BusRoutebase class,Busderived class - Inheritance —
BusextendsBusRoute - Constructors — default and parameterized
- Arrays — fixed-size
seats[32]array insideBus - Vectors — global
vector<Bus> busescollection - Pointers —
Bus* findBus(...)returns pointer ornullptr - Input validation — duplicate bus numbers, out-of-range seats, already-booked seats
- Menu-driven programming —
do-whileloop withswitch
1. User visits the app
│
├─ Load demo data (optional) → 5 pre-built routes with pre-booked seats
│
2. Browse routes (All Buses view)
│
├─ Search by bus no, from, to, or driver name
├─ View seat map in a modal
└─ Click "Reserve →" to jump to booking
│
3. Reserve a Seat (3-step flow)
│
├─ Step 1: Select a bus from the list
├─ Step 2: Click an available seat on the visual seat map
└─ Step 3: Enter passenger name → Confirm Booking
│
4. Booking Confirmed ✅
└─ Ticket card displayed with route, seat, driver, departure info
- Ticket cancellation / refund system
- Persistent storage (localStorage or backend DB)
- Fare calculation based on route distance
- User authentication (login / registration)
- PDF ticket download
- Admin dashboard with analytics
- Filter buses by date, origin, and destination
- Dark / light mode toggle
Geo Jose
Sree Narayana Gurukulam College of Engineering
This project was developed for academic learning purposes — applying OOP concepts in C++ and then translating that logic into a modern web application. Suggestions and contributions are always welcome!
Made with ❤️ by Geo Jose