This project is a comprehensive bus ticket booking and management system developed in C++. It allows users to book bus tickets, manage passenger details, and includes administrative functions for bus and ticket management. Bus Reservation System
The Bus Reservation System is a console-based application written in C++ that allows users to book bus tickets, manage bus details, and view booking information. It provides functionalities for both administrators and passengers.
Administrator Functions: Add new buses with details like bus number, driver name, arrival/departure times, source, and destination. Manage seat allotment and availability. Display buses and their availability. Passenger Functions: Book tickets for available buses. Display booked tickets. Calculate fares including optional insurance costs.
- Clone the repository:
git clone https://github.com/your_username/bus-reservation.git
- Navigate to the project directory:
cd bus-reservation
- Compile the code using a C++ compiler:
Compile the C++ files using your preferred compiler (e.g., g++)
g++ main.cpp -o main
- Run the executable:
./main
- Log in with appropriate credentials.
- Use the menu to manage buses (add, view, etc.).
- Book a ticket by selecting available buses.
- View booked tickets and fare details.
Adding a Bus
Enter bus no: 1234
Enter Driver's name: John Doe
Arrival time: 09:00 AM
Departure: 05:00 PM
From: CityA
To: CityB
Seats initialized.
Select the Bus No: 1234
----------------------------------------------------------------
Bus No || Source || Destination || Bus Name || Distance(KM) || Arr. time(Hrs) || Dept. time(Hrs) || Duration
----------------------------------------------------------------
1234 CityA CityB ABC Bus 100 09:00 AM 05:00 PM 8 hrs
Booked Bus is ....
----------------------------------------------------------------
Bus No || Source || Destination || Bus Name || Distance(KM) || Arr. time(Hrs) || Dept. time(Hrs) || Duration
----------------------------------------------------------------
1234 CityA CityB ABC Bus 100 09:00 AM 05:00 PM 8 hrs
Child fare: 500
Adult fare: 1000
Temporary fare: 1500
Want to take insurance (y/n)?
Rs 1/Km for child
Rs 2/Km for adult: y
Total fare: 1600
Bus no: 1234
Driver: John Doe Arrival time: 09:00 AM Departure time: 05:00 PM
From: CityA To: CityB
- Users will interact with the system via a command-line interface.
- Menus will guide the user to perform various operations.
- Success and error messages will be displayed accordingly.
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
For any questions or suggestions, please contact [email protected].