Courseiva
Design PatternshardMultiple ChoiceObjective-mapped

PCPP2 Design Patterns Practice Question

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

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Intrinsic state is shared/immutable, extrinsic is context-dependent

Intrinsic state is shared and immutable (stored in the Flyweight), while extrinsic state is unique to the context and passed into the Flyweight's methods.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Both are shared, but intrinsic is stored in a database

    Why it's wrong here

    Storage location is not the defining characteristic of these states.

  • Intrinsic state is shared/immutable, extrinsic is context-dependent

    Why this is correct

    This correctly identifies that intrinsic state is shared and extrinsic is passed in.

  • Neither state can be changed once the Flyweight is instantiated

    Why it's wrong here

    Extrinsic state is mutable by definition as it depends on the specific context.

  • Intrinsic state is the unique data, extrinsic is the shared data

    Why it's wrong here

    This is the exact opposite of the definition.

About these practice questions

One of 194 original PCPP2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official Python Institute exam blueprint

This PCPP2 practice question is part of Courseiva's free Python Institute certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCPP2 exam.