Example #1
0
 def provideFeedback(self,comment,rating, booking):
     bookings = self.getAllBookings(self)
     for book in bookings:
         if book.__gid == booking:
             groupId = book.__groupID
             cs = CabSharing()#singleton 
             group = cs.getGroupFromID(cs, groupId)      
             driver = group.getDriverSub(group)
             driver.addComment(driver, comment)
             driver.updateRatings(driver, rating)
Example #2
0
 def bookCab(self,bookingPref):
     cs = CabSharing()#singleton 
     passenger = bookingPref['passenger']
     pickup = bookingPref['pickup']
     dropoff = bookingPref['dropoff']
     time = bookingPref['time']
     rating = bookingPref['rating']
     shared = bookingPref['shared']
     accomp = bookingPref['accomp']
     grp = bookingPref['grp']
     booking = Booking(self,passenger,pickup,dropoff,time,rating,shared,accomp,grp)
     cs.addBookingToGrid(cs, booking)
     self.__bookings.append(booking)
Example #3
0
 def cancelCab(self,bID):
     cs = CabSharing()#singleton
     cs.cancelBooking(cs, bID)
Example #4
0
 def endTrip(self,travelSummary):   
     cs = CabSharing()#singleton 
     cs.endTrip(cs, travelSummary)