import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; public class Client { public static void main(String[] args) { if (System.getSecurityManager() == null) System.setSecurityManager(new SecurityManager()); try { String serviceName = "ReservationService"; Registry registry = LocateRegistry.getRegistry(args[0]); Reservation reservation = (Reservation)registry.lookup(serviceName); int customerId = 0; Interval interval = new Interval(); int numberOfSeats = 0; if (reservation.makeReservation(customerId,interval,numberOfSeats)) { System.out.println("The reservation has been made successfully"); } else { System.out.println("The reservation has not been made successfully"); } } catch (Exception exception) { System.out.println("An exception has occurred: "+exception.getMessage()); if (Constants.DEBUG) exception.printStackTrace(); } } }