| English | 意味 |
|---|---|
| complexity/kəmˈpleksɪti/ | 複雑性 |
| Data abstraction/ˈdeɪtə əbˈstrækʃn/ | データ抽象化 |
| list/lɪst/ | リスト |
| abstract data type/ˈæbstrækt ˈdeɪtə taɪp/ | 抽象データ型 |
| general/ˈdʒenərəl/ | 汎用的 |
| abstraction/əbˈstrækʃn/ | 抽象化 |
| modeling/ˈmɒdəlɪŋ/ | モデリング |
| model/ˈmɒdl/ | モデル |
Hiding detail to manage complexity
- Real programs deal with a lot of data.
- Data abstraction 数据抽象 hides detail so we can manage complexity 复杂性.
- Instead of tracking many small pieces separately, we group them under one name.
- The most common tool for this is a list 列表.
Use a list, or one variable?
A list (data abstraction) is worth it when you have many similar values; a single variable is enough for one standalone value.
Data abstraction helps a programmer by:
難易度 1/5 · 100 コイン + 今日初回完了時に小ボーナス付与
Grouping data under one name hides needless detail.
A ______ groups many values under one name, like all the marks of a class.
難易度 1/5 · 100 コイン + 今日初回完了時に小ボーナス付与
A list is the most common abstract data type.
Using a list makes code general: the same loop works for 5 or 500 values.
難易度 1/5 · 100 コイン + 今日初回完了時に小ボーナス付与
The code refers to the list by name, not to each value.
Lists group many values
- A list is an abstract data type 抽象数据类型 that groups many values under one name.
- One list
scorescan hold a whole class's marks — not a separate variable per student. - Using a list makes code more general 通用: the same code works with 5 values or 500.
- It refers to the list by name, not to each value one by one.
Which are benefits of data abstraction? (Select all that apply)
難易度 2/5 · 140 コイン + 今日初回完了時に小ボーナス付与
One clear name beats fifty separate ones on all three counts.
Why abstraction helps
- Less repetition — you write the logic once, not once per value.
- Easier changes — add a value to the list and the same code still works.
- Fewer mistakes — one clear name is easier to get right than fifty separate names.
- This naming and grouping is the heart of abstraction 抽象.
A model of a class stores names but ignores eye colour because:
難易度 1/5 · 100 コイン + 今日初回完了時に小ボーナス付与
A model simplifies reality, keeping only the relevant detail.
With a list, adding a sixth student needs no new variable and no new print line.
難易度 1/5 · 100 コイン + 今日初回完了時に小ボーナス付与
Only the data changes; the same loop handles it.
Abstraction is modeling
- Data abstraction is a form of modeling 建模.
- A model 模型 simplifies something so we can focus on what matters.
- A list of student names models a class, ignoring details like eye colour the program never needs.
Five marks. Without abstraction: five variables mark1…mark5 and five print lines. With a list marks: one loop prints every element. If a sixth student joins, only the data changes — no new variable, no new line.
Data abstraction hides detail to manage complexity, usually with a list — an abstract data type grouping many values under one name. It makes code general (works for any size), reduces repetition and mistakes, and is a kind of modeling: keep what matters, ignore the rest.