public Ticket issueTicket(String m_plateLisence) { Ticket ticket = null; error = null; try { if (garage.isFull()) { error = EntryError.full; return null; } ticket = garage.issueTicket(m_plateLisence); return ticket; } catch (RemoteException re) { error = EntryError.errorRemote; remoteException = re; return null; } catch (InvalidPlateLisenceExecption ite) { error = EntryError.invalidPlateLisence; return null; } catch (ExistPlateLisenceException ite) { error = EntryError.errorExist; return null; } catch (InvalidNoPayException ite) { error = EntryError.noPay; return null; } }
public void get_garage_status() { try { signStatus = garage.getSignStatus(); rate = garage.getFeeRate(); DecimalFormat money = new DecimalFormat("$0.00"); capacity = garage.getMaxSpaces(); spaces = garage.getMaxSpaces() - garage.getUsedSpaces(); } catch (Exception e) { System.out.print("Exeption:" + e); } }
public boolean enterSuccess(Ticket ticket) { try { garage.enterSuccess(ticket); return true; } catch (RemoteException re) { error = EntryError.errorRemote; return false; } }
public boolean printFail(Ticket ticket) { try { garage.printFailed(ticket); return true; } catch (RemoteException re) { error = EntryError.errorRemote; remoteException = re; return false; } }