This is java - based application that dynamically allocates taxis for the customers. Consistently maintains and updates the current position of the taxi and the earnings of each taxis.
- Java
- Object Oriented Programming
- Data Structures
- GitHub
Main.java: Handles user input and provides options for booking taxis, viewing details, or exiting the system.
Taxi.java: Represents individual taxis with attributes like location, earnings, and booking details.
A list of taxis ensures scalability, with the system dynamically creating and assigning taxis up to a predefined limit (e.g., 4 taxis).
Each taxi's status, including its current position, earnings, and booking history, is tracked and updated in real-time.
- Users can book a taxi by specifying pickup and drop locations (as alphabetic points) and the desired pickup time.
- Customers are provided with a confirmation that includes the allocated taxi number or a notification if no taxis are available.
- The system allows users to view a detailed history of bookings and taxi performance, including earnings and current positions.
- Initially there are 6 locations(A,B,C,D,E).
- The distance between each point is 15kms.
- It takes 60 minutes to travel from one locations to another.
- Each Taxi charges Rs.100 minimum for the first 5kms and Rs.10 for each subsequent kilometers.
- The taxi nearest to the location of the customer is allocated.
- If two or more taxi is present at the same distance the taxi with the least earnings is allocated.
- If there is no taxi available, booking will be rejected.