public double CalculateFare(cabRide cabride, double Distance, double Time)
        {
            double totalFare = Distance * minimumCostPerKilometer + Time * costPerTime;

            if (totalFare < mimumFare)
            {
                return(mimumFare);
            }
            else
            {
                return(totalFare);
            }
        }
Ejemplo n.º 2
0
 public Ride(cabRide rideType, double distance, double time)
 {
     this.rideType = rideType;
     this.distance = distance;
     this.time     = time;
 }