Courseiva

PCPP2 · topic practice

Design Patterns practice questions

Practise PCPP2 NAT and PAT questions covering address translation types, inside/outside interface roles, static vs dynamic vs PAT, and troubleshooting missing or incorrect translations.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Reviewed byJohnson Ajibi· MSc IT Security
20 questionsDomain: Design Patterns

What the exam tests

What to know about Design Patterns

NAT questions usually test how private addresses are translated, when to use static NAT, dynamic NAT or PAT, and how inside/outside interfaces affect traffic flow.

Static NAT, dynamic NAT and PAT behaviour.

Inside local, inside global, outside local and outside global address meanings.

How NAT affects connectivity between private networks and public destinations.

How to troubleshoot NAT rules, ACL matches and interface direction.

Why learners struggle

Why Design Patterns questions are commonly missed

NAT questions are missed when learners confuse the four address types (inside local, inside global, outside local, outside global) or misapply the interface direction. A translation rule can look correct but still fail if the ACL, interface, or direction is wrong.

  • ·Inside local vs inside global — inside local is the private source, inside global is the translated public address
  • ·PAT overloads — many sources share one public IP using unique port numbers
  • ·Interface direction — ip nat inside and ip nat outside must be on the correct interfaces
  • ·Static NAT vs dynamic NAT vs PAT — each serves a different use case
  • ·The NAT ACL identifies traffic to translate, not traffic to permit or deny
  • ·A missing translation can look like a routing problem if the interfaces are misconfigured

Watch out for

Common Design Patterns exam traps

  • PAT allows many inside hosts to share one public address by using port numbers.
  • NAT rules depend on correct inside and outside interface configuration.
  • The ACL used for NAT identifies traffic to translate; it is not always a security filtering ACL.
  • Static NAT maps one private address to one public address, while PAT overloads translations.

Practice set

Design Patterns questions

20 questions · select your answer, then reveal the explanation

When using the Template Method pattern, which Python feature prevents subclasses from overriding specific steps of the algorithm?

Question 2mediummultiple choice
Study the full Python automation breakdown →

In a Factory Method pattern, you have a base creator class with an abstract method create_product(). How should a concrete creator implementation be structured to adhere to Python's abc module standards?

Question 3mediummultiple choice
Study the full Python automation breakdown →

You are implementing a Singleton pattern in Python using a metaclass. Which mechanism ensures that the __call__ method of the metaclass is only executed once for a specific class?

Question 4mediummultiple choice
Read the full Design Patterns explanation →

In the Observer pattern, what is the best way to prevent memory leaks when the Subject maintains a list of Observers?

Question 5mediummultiple choice
Read the full Design Patterns explanation →

You are implementing the Command pattern. How can you best support the 'Undo' operation for a command that changes a document's state?

Question 6mediummultiple choice
Read the full Design Patterns explanation →

You are implementing a Proxy pattern to provide lazy initialization for a resource-heavy object. Which technique is most effective for checking if the real object exists without triggering its constructor prematurely?

You are applying the Facade pattern to simplify a complex subsystem consisting of three interacting legacy modules. What is the primary architectural requirement for the Facade class to be effective?

Question 8mediummultiple choice
Read the full Design Patterns explanation →

You are designing a State pattern. Which component is responsible for changing the state of the context object?

Question 9mediummultiple choice
Read the full Design Patterns explanation →

In the Chain of Responsibility pattern, how does a handler decide whether to pass a request to the next handler?

Question 10mediummultiple choice
Read the full Design Patterns explanation →

When implementing the Strategy pattern, what is the best way to inject the strategy into the context object?

Question 11mediummultiple choice
Read the full Design Patterns explanation →

In the Decorator pattern, why is it preferred to use the functools.wraps decorator when creating a function decorator?

Question 12mediummultiple choice
Read the full Design Patterns explanation →

You are implementing a Prototype pattern. What is the difference between shallow copy and deep copy in the context of cloning objects?

Question 13hardmultiple choice
Read the full Design Patterns explanation →

You are implementing the Flyweight pattern to optimize memory usage for a text processor. What is the distinction between 'intrinsic' and 'extrinsic' state?

Question 14hardmultiple choice
Read the full Design Patterns explanation →

You are using the Composite pattern to represent a tree structure of UI elements. What is the most critical challenge when implementing a 'get_parent' method in this pattern?

Which Python design principle is most strongly supported by the Adapter pattern?

Question 16hardmultiple choice
Read the full Design Patterns explanation →

When implementing the Bridge pattern, what is the primary structural requirement to effectively decouple an abstraction from its implementation?

Question 17mediummultiple choice
Read the full Design Patterns explanation →

In the Memento pattern, which component is responsible for storing the state of the Originator without exposing its internal structure?

Which of the following is a classic use case for the Builder pattern in Python?

Question 19hardmultiple choice
Read the full Design Patterns explanation →

You are implementing the Visitor pattern to add operations to a set of stable class structures. Why is the 'Double Dispatch' mechanism essential?

Question 20easymultiple choice
Read the full Design Patterns explanation →

Which pattern is most appropriate for a scenario where you want to provide a standard interface for a suite of related or dependent objects without specifying their concrete classes?

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Design Patterns sessions

Start a Design Patterns only practice session

Every question in these sessions is drawn from the Design Patterns domain — nothing else.

Related practice questions

Related PCPP2 topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the PCPP2 exam test about Design Patterns?
NAT questions usually test how private addresses are translated, when to use static NAT, dynamic NAT or PAT, and how inside/outside interfaces affect traffic flow.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Design Patterns questions in a focused session?
Yes — the session launcher on this page draws every question from the Design Patterns domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other PCPP2 topics?
Use the topic links above to move to related areas, or go back to the PCPP2 question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the PCPP2 exam covers. They are not copied from any real exam or dump site.