Multiple choice technology architecture

Which Behavioral Pattern would help in parsing and translate a Specific Expression?

  1. Command

  2. Interpreter

  3. Observer

  4. Iterator.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Interpreter Pattern defines a grammar for a language and an interpreter to evaluate sentences in that language - specifically designed for parsing and translating expressions. Command encapsulates requests as objects. Observer defines one-to-many dependencies. Iterator traverses aggregates sequentially.