A C++ console application simulating a ride-hailing service similar to Uber. This project demonstrates object-oriented programming concepts including inheritance, polymorphism, and encapsulation.
- User Authentication: Register new accounts or login with existing credentials
- Vehicle Selection: Choose from three vehicle types with different pricing:
- Moto: Base fare ₨40 for ≤2km, ₨15/km thereafter
- Uber Mini: Base fare ₨60 for ≤2km, ₨35/km thereafter
- Uber Go: Base fare ₨100 for ≤2km, ₨45/km thereafter
- Ride Simulation: Random distance generation, fare calculation, and driver availability
- Wallet Management: Track payment and remaining balance
- Feedback System: Rate your ride experience
- Polymorphic Fare Calculation: Uses inheritance and virtual functions for different vehicle types
- C++ compiler (g++, MinGW, or Visual Studio)
- Windows OS (for system commands like COLOR and Beep)
- Ensure you have a C++ compiler installed (e.g., g++, MinGW, or Visual Studio)
- Ensure the project structure is intact, with the
libsdirectory containing the header files - Compile the project:
g++ project2.cpp -o ride_management - Run the executable:
ride_management.exe
-
Registration/Login:
- Choose 'S' to sign up or 'L' to login
- For signup: Enter name, age, email, and password
- For login: Enter email and password
-
Book a Ride:
- Enter pickup and drop locations
- Select vehicle type (1-3)
- View ride details including distance, fare, and active drivers
-
Payment and Feedback:
- Enter payment amount
- Rate your experience (1-5 stars)
- View remaining wallet balance
project2.cpp: Main application file containing all classes and logiclibs/register.h: Header file for user registration functionalitylibs/loginacc.h: Header file for user login functionality
VehicleType: Abstract base class for vehicles (polymorphism)MotoType,UberMiniType,UberGoType: Derived vehicle classesRegister: Handles user registrationlogin: Handles user authenticationAccount: Combines registration and login, manages walletRide: Main ride management class inheriting from Account
- This is a console-based simulation for educational purposes
- Distances are randomly generated for demonstration
- The application uses Windows-specific functions (Beep, system("COLOR"))
Developer: AsadDevs
This project was developed as part of the 2nd Semester Object-Oriented Programming (OOP) course at NCBAE (National College of Business Administration & Economics).
- Name: AsadDevs
- Institution: NCBAE (National College of Business Administration & Economics)
- Course: Object-Oriented Programming (OOP) - 2nd Semester
- Project Type: Educational Console Application
This is an educational project developed for learning purposes. The ride-hailing simulation is not intended for production use or real-world deployment. All pricing and vehicle types are fictional and used solely for demonstration of OOP concepts.
This project is provided as-is for educational purposes. Please contact the developer for licensing inquiries.
For questions, bug reports, or contributions related to this project, please reach out to the developer.