Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
27.3.12. Proxy Pattern
This section
Practice test
12 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
4 cards from this lesson. Good the night before a test.
Try these first
- 1.
What is a proxy in the context of design patterns?
Hint
Think about what a proxy does in relation to another object.
- 2.
Name one type of proxy.
Hint
Consider different access scenarios for objects.
- 3.
What is the main role of a Proxy in design patterns?
- To create new objects
- To control access to another object
- To store data
Hint
Consider what a proxy does in terms of access control.
- 4.
True or False: A virtual proxy always creates an object immediately.
- True
- False
Hint
Think about resource optimization techniques.
- 5.
Design a simple application that utilizes the Proxy Pattern for accessing a database. Describe the classes and their responsibilities.
Hint
Think about separating the concerns of direct database interactions and access control.
- 6.
Discuss a scenario where a protection proxy might introduce latency. How would you mitigate this issue?
Hint
Look at the interaction flow and consider optimizations in permission checking.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
2 more questions available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting