Develop a ride-sharing application with the following features:
-
User Roles: Users can either offer a shared ride (Driver) or consume a shared ride (Passenger).
-
Ride Selection: Users can search and select from multiple available rides on a route with the same source and destination.
Implement functionality to add user details.
add_user(user_detail)
Implement functionality to add vehicle details for users.
add_vehicle(vehicle_detail)
Allow users to offer a shared ride on a route with specific details.
offer_ride(ride_detail)
Users can select a ride from multiple offered rides using a selection strategy based on preferred vehicle or most vacant seats.
select_ride(source, destination, seats, selection_strategy)
Implement functionality to end a ride. Users can offer a ride for a given vehicle only when there are no active offered rides for that vehicle.
end_ride(ride_details)
Retrieve and display total rides offered/taken by all users.
print_ride_stats()