EcoRide is a city-wide bike-sharing platform that allows users to rent manual or electric bikes. Each bike is equipped with a digital odometer that tracks distance in kilometers.
There are two categories of membership: Standard and Gold. The platform calculates the cost of each trip based on several variables within a mathematical model.
BIKE_TYPE
The category of bike rented, which is either "Manual" or "Electric".
START_ODO
The odometer reading at the start of the journey (a 4-digit integer display in km).
END_ODO
The odometer reading at the end of the journey (a 4-digit integer display in km).
BASE_FEE
A fixed service charge applied to every trip. The standard fee is $5.00, but this is reduced by 20% for Gold members.
BATT_LEVEL
A variable recorded only for electric bikes, representing the battery percentage (0–100) remaining upon return.
The digital odometers function as follows:
- The display increments by one for every full kilometer traveled.
- The display has a maximum value of 9999. If it exceeds this, it resets to 0000 and continues counting.
The billing rules for the EcoRide model are as follows:
- The rate for a Manual bike is $0.50 per kilometer.
- The rate for an Electric bike is $1.20 per kilometer.
- The total cost is the sum of the distance-based charge and the
BASE_FEE.
- EcoRide encourages sustainable management: if an Electric bike is returned to a designated "Green Zone" with a
BATT_LEVEL of 80% or higher, a 15% discount is applied to the entire trip cost.