ITPEC FE Morning October 2022 Question 47
ITPEC FE Morning October 2022 — Question 47 of 80
Adapter Pattern — a structural design pattern that wraps an incompatible interface to make it compatible.
Adapter converts one interface into another that a client expects, allowing incompatible classes to work together.
Design pattern categories:
- Structural — connecting/wrapping: Adapter, Decorator, Facade, Proxy, Bridge, Composite
- Creational — object creation: Factory, Singleton, Builder, Prototype
- Behavioral — interaction: Iterator, Observer, Strategy, State, Command
Why not others:
- (b) Factory — creational pattern (creates objects without specifying exact class)
- (c) Iterator — behavioral pattern (sequential access to collection elements)
- (d) Singleton — creational pattern (ensures only one instance exists)
Key rule: If the question says "incompatible interfaces" → Adapter. If "wraps to add behavior" → Decorator. If "simplified interface" → Facade.
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.