I was going through the proxy pattern and noticed that the Proxy class also implements the Subject interface, which is implemented by the concrete implementations or the Subject classes as well.
Can anyone provide a reason why we need to do so ?
We could have created a function in the proxy class and call the subject methods inside this function. Then the client code can call this proxy class function and the appropriate methods could be called.