@Override public void processCashPayment(BigDecimal amount, String ticketId) throws ParkingGarageException, java.rmi.RemoteException { ExitEventImpl exitEvent = (ExitEventImpl) entryExitManager.getExitEvent(ticketId); Payment payment = paymentManager.createCashPayment(amount, new Date()); exitEvent.addPayment(payment); }
@Override public void processIou( BigDecimal amount, String customerName, String customerPhone, String customerAddress, String ticketId) throws ParkingGarageException, java.rmi.RemoteException { ExitEventImpl exitEvent = (ExitEventImpl) entryExitManager.getExitEvent(ticketId); exitEvent.setIou(new Iou(amount, new Date(), customerName, customerAddress, customerPhone)); }