Skip to main content

State vs Switch/If Chains: The Refactor Path

This generated surface maps a learner-facing curriculum unit to its canonical source routes.

Curriculum surface

  • Open learner-facing unit
  • Curriculum path: content/curriculum/foundations/semester-03-software-design/module-03-behavioral-patterns/concepts/cluster-04-state-and-behavior-switching-patterns/11-state-vs-switch-if-chains-the-refactor-path-primary.md
  • App: foundations
  • Semester: semester-03-software-design
  • Module: module-03-behavioral-patterns
  • Unit kind: concept
  • Curation level: generated_default

Learning objectives

  • Explain State vs Switch/If Chains: The Refactor Path in the language of the current curriculum, not just the source book.
  • Apply State vs Switch/If Chains: The Refactor Path to one concrete learner task or example inside this semester.
  • Use clean-code, ooad, refactoring as a selective source of truth when the learner-facing explanation is not enough.

Prerequisites

  • The earlier concept pages and practice tasks in the current module.

Source books

  • clean-code
  • ooad
  • refactoring

Source routes

Clean Code

Ooad

  • /books/ooad via OOAD: Replacing Event Conditionals with Polymorphism

Refactoring

  • /books/refactoring via Refactoring: Code Smells -- Repeated Switches, Refactoring: Code Smells — Repeated Switches, Refactoring: Decompose Conditional, Refactoring: Replace Conditional with Polymorphism (Part 1), Refactoring: Replace Conditional with Polymorphism (Part 2)

Supporting curriculum routes

No supporting curriculum routes linked yet.

External enrichment

No curated enrichment resources yet.

AI companion modes

  • Explain simply
  • Socratic tutor
  • Quiz me
  • Challenge my understanding
  • Diagnose my confusion
  • Generate extra practice
  • Revision mode
  • Connect forward / backward

Source-of-truth note

This teaching unit is learner-facing guidance assembled from multiple canonical book routes. Use the listed source books as the primary conceptual spine for State vs Switch/If Chains: The Refactor Path, and treat outside material as supporting enrichment only.