//Method to delete the set of car hire details from a set booking of //a set customer within the list of customers. public void deleteHire(int CustomerID, int BookingRef, String DriverName) { Booking booking = findBooking(CustomerID, BookingRef); HireCar hDel = this.findHire(CustomerID, BookingRef, DriverName); if (hDel != null) { booking.Hires.Remove(hDel); } }
//Method to add a new set of car hire details to a set booking of a set //customer within the list of customers. public void addHire(int CustomerID, int BookingRef, HireCar hire) { Booking booking = findBooking(CustomerID, BookingRef); booking.Hires.Add(hire); }