@@ -0,0 +1,1586 @@
+interface Image %7B%0A    public void displayImage();%0A%7D%0A%0A//on System A%0Aclass RealImage implements Image %7B%0A%0A    private String filename = null;%0A    /**%0A     * Constructor%0A     * @param aFilename%0A     */%0A    public RealImage(final String aFilename) %7B%0A        filename = aFilename;%0A        loadImageFromDisk();%0A    %7D%0A%0A    /**%0A     * Loads the image from the disk%0A     */%0A    private void loadImageFromDisk() %7B%0A        System.out.println(%22Loading    %22 + filename);%0A    %7D%0A%0A    /**%0A     * Displays the image%0A     */%0A    public void displayImage() %7B%0A        System.out.println(%22Displaying %22 + filename);%0A    %7D%0A%0A%7D%0A%0A//on System B%0Aclass ProxyImage implements Image %7B%0A%0A    private RealImage image = null;%0A    private String filename = null;%0A    /**%0A     * Constructor%0A     * @param aFilename%0A     */%0A    public ProxyImage(final String aFilename) %7B%0A        filename = aFilename;%0A    %7D%0A%0A    /**%0A     * Displays the image%0A     */%0A    public void displayImage() %7B%0A        if (image == null) %7B%0A           image = new RealImage(filename);%0A        %7D%0A        image.displayImage();%0A    %7D%0A%0A%7D%0A %0Aclass ProxyExample %7B%0A%0A   /**%0A    * Test method%0A    */%0A   public static void main(String%5B%5D args) %7B%0A        final Image IMAGE1 = new ProxyImage(%22HiRes_10MB_Photo1%22);%0A        final Image IMAGE2 = new ProxyImage(%22HiRes_10MB_Photo2%22);    %0A       %0A        IMAGE1.displayImage(); // loading necessary%0A        IMAGE1.displayImage(); // loading unnecessary%0A        IMAGE2.displayImage(); // loading necessary%0A        IMAGE2.displayImage(); // loading unnecessary%0A        IMAGE1.displayImage(); // loading unnecessary%0A    %7D%0A%0A%7D%0A

Create proxy.java