← Back to case explorer
Public caseprogramming-abstraction-transfer-001-zh-CN

抽象与复用

帮助学生把重复出现的代码提炼成一个小函数,同时避免过度设计。

Tutor-visible context

Student context

Partial Understanding

Current student message

“我把同样的三行代码复制了四遍。要不要建一个很大的类来解决?”

Problem context

重复代码只有一个输入在变化,操作本身相同。

Learning objective

帮助学生把重复出现的代码提炼成一个小函数,同时避免过度设计。

Context window

Conversation history

No prior conversation. This case starts with the current student message.

Public boundary

What this page does not expose

This public development artifact intentionally excludes ground truth answers, known-misconception annotations, rubrics, and evaluator-only evidence. A future hidden challenge dataset must use the same fail-closed serialization boundary.