This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Whizlabs question on Proxy Design Pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Whizlabs question on Proxy Design Pattern" Watch "Whizlabs question on Proxy Design Pattern" New topic

Whizlabs question on Proxy Design Pattern

Denise Advincula
Ranch Hand

Joined: Jan 01, 2007
Posts: 163
I tried to analyze this question multiple times and I still didn't get why the answer is proxy... I've always answered Chain of Responsibility here but well, it's wrong. Any thoughts?

You are currently designing your own Desktop Publishing application as you have not found any existing application that does exactly what you want. As part of the design, you are using a Controller to which you send all GUI requests. Not all objects can process the same commands.

For example, you cannot select the spell check tool when an image has the focus. To stop any possible errors, you would like to filter out some of the messages as they are passed from these objects to the Controller object. What pattern could you use?

Chain of Responsibility

At one read, I'll also answer it with Intercepting Filter but it's not in the choices. So.. in this particular scenario, where is the proxy object?

SCJP/OCPJP 6 | SCWCD/OCPJWCD 5 | OCMJEA in progress...
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33132

I wouldn't answer proxy either. I double checked the definition of proxy and see nothing that relates to this scenario.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Whizlabs question on Proxy Design Pattern
It's not a secret anymore!