示例#1
0
        public Invoice_Data GetSummary(List <Ride> listOfRides)
        {
            double       fare        = FareOfMultipleRides(listOfRides);
            Invoice_Data invoiceData = invoiceSummary.GetInvoice(listOfRides.Count, totalFare);

            return(invoiceData);
        }
示例#2
0
        public Invoice_Data GetInvoice(int userId)
        {
            List <Ride>  listOfRides = rideRepository.GetRides(userId);
            Invoice_Data invoiceData = GetSummary(listOfRides);

            return(invoiceData);
        }
        public Invoice_Data GetInvoice(int numberOfRides, double totalFare)
        {
            double averageFare = totalFare / numberOfRides;

            invoiceData = new Invoice_Data(numberOfRides, totalFare, averageFare);
            return(invoiceData);
        }