Skip to main content

Semester 3 Exam

Required Output Classification

Required outputClassificationPublic/private guidance
Timed written answers, diagrams, code snippets, and design responsesCheckpoint evidenceKeep raw exam work private so it remains useful for assessment and retake calibration.
Post-exam review notes, missed-answer repairs, and Feynman explanationsPractice artifactUse for spaced review; publish only rewritten explanations that no longer reveal exam solutions wholesale.
Capstone-defense or architecture-defense packets created from exam promptsPortfolio candidatePolish publicly only when they are original to your project, sanitized, and framed as engineering rationale rather than exam answers.

This exam measures whether you can reason about design, not whether you can remember chapter titles. Use closed notes unless your study contract explicitly allows one page of handwritten notes.


Format

SectionFocusDurationPoints
ASmells and diagnosis20 min20
BRefactoring and safety20 min20
CPattern selection20 min20
DDesign review and tradeoffs30 min40

Total: 90 minutes, 100 points.


Coverage Map

  • S3M1: cohesion, coupling, encapsulation, SOLID lenses, smell recognition
  • S3M2: safe refactor steps, characterization tests, preserving behavior
  • S3M3: Strategy, Observer, Command
  • S3M4: Factory, Adapter, Decorator, composition vs subclassing
  • S3M5: code review, ADRs, over-engineering vs under-engineering, reversibility

Section A: Smells and Diagnosis

  1. A class named ReportService fetches data, formats CSV output, logs audit events, and sends email. Identify two smells and state the first refactor move you would try.
    10 points

  2. A module has small functions and tidy naming, but every change to pricing rules requires edits in five files. What system-level smell does this suggest, and why is it expensive?
    10 points


Section B: Refactoring and Safety

  1. You inherit a 250-line method with no tests. Describe a safe sequence of steps for refactoring it. Be explicit about what you would do before changing behavior.
    10 points

  2. Explain the role of characterization tests in refactoring. Then give one case where they are not enough by themselves.
    10 points


Section C: Pattern Selection

  1. Your application supports multiple pricing rules selected at runtime. New rules arrive regularly, and you want to avoid repeated conditional logic. Which pattern is the best fit, and what pressure does it relieve?
    10 points

  2. You must integrate a third-party API whose interface does not match your domain model. Which pattern is the best starting point, and what problem would Factory or Decorator fail to solve here?
    10 points


Section D: Design Review and Tradeoffs

  1. Review this proposal:

    "We only have one export format today, but we should introduce an abstract exporter, three interfaces, a registry, and a plugin loader now so we are ready for the future."

    Write a short review response that:

    • names the likely over-design risk
    • explains what evidence is missing
    • suggests a smaller design that preserves future options
      20 points
  2. Write a one-page mini ADR for a semester-project decision of your choice. Include:

    • context
    • decision
    • alternatives considered
    • consequences

    The ADR should show that you understand tradeoffs, not just the decision you prefer.
    20 points


Scoring Standard

  • 90-100: ready to advance comfortably
  • 80-89: acceptable, but revisit the weakest module before Semester 4
  • 70-79: partial understanding; repeat targeted practice and retake
  • <70: do not advance yet

Automatic hold even with a passing score:

  • you cannot explain why a chosen pattern is better than a conditional or simple function
  • you propose refactoring without a safety strategy
  • your review comments rely on taste words without evidence

Post-Exam Reflection

After grading, write three short notes:

  1. Which problem type cost you the most time?
  2. Which wrong answer came from weak judgment rather than weak memory?
  3. What will you change in your project or review habits before Semester 4?

Added Design-Reasoning Prompts

Use these prompts to test whether the OOAD material is usable under pressure.

  1. Given a meeting scheduler with recurring meetings, room constraints, and notification channels, identify classes, responsibilities, collaborations, and one invalid inheritance relationship.
  2. Given a restaurant-management workflow, choose between State, Command, Strategy, and a plain function table. Defend the choice and write one "when not to use it" warning.
  3. Critique a design that uses factories, adapters, and observers before there is any variation pressure. Name what you would remove first and how tests would protect the simplification.
  4. Write a short ADR for a pattern choice. It must include context, alternatives, decision, consequences, and a follow-up risk.

Mastery Rubric

LevelEvidence
Beginner passCan answer direct questions and complete familiar exercises with light notes.
Solid passCan solve new variants, explain choices, and connect the work to Semester 2 Algorithms and Data Structures.
Strong passCan defend tradeoffs, identify failure modes, and produce clean evidence in the portfolio artifact.
Not readyRelies on copied solutions, cannot explain mistakes, or lacks durable artifacts.

Retake and Repair Rule

If a section is weak, do not only reread. Repair it by producing new evidence: a corrected solution, a fresh implementation, a rewritten proof, a benchmark, a diagram, a runbook, or a short teaching note.


Answer-Quality Examples

Use these examples when grading written answers or spoken explanations.

QualityExample pattern
WeakNames a concept but gives no example, constraint, or failure case.
AcceptableDefines the concept and applies it to a familiar exercise.
StrongApplies the concept to a new variant and explains why an alternative would fail.
Portfolio-readyConnects the concept to Semester 2 Algorithms and Data Structures, current project evidence, and a future capstone decision.

Interleaving Prompt

For any missed answer, add one sentence starting with: This depends on an earlier skill because...

Calibration Materials

Use these learner-visible calibration materials before self-grading or requesting review: