The development life cycle and design tools
引入
9:16
程序开发生命周期
你手机上的每一个应用都是由像这样的人编写的。但他们并非从敲下代码开始。在第一行代码之前,问题被研究,解决方案被设计……
英文讲解 · 可切换中英文字幕
本课内容
| English | 释义 | 拼音 |
|---|---|---|
| program/ˈprəʊɡræm/ | 程序 | chéng xù |
| program development life cycle/ˈprəʊɡræm dɪˈveləpmənt laɪf ˈsaɪkl/ | 程序开发生命周期 | chéng xù kāi fā shēng mìng zhōu qī |
| design/dɪˈzaɪn/ | 设计 | shè jì |
| algorithm/ˈælɡərɪθəm/ | 算法 | suàn fǎ |
| input/ˈɪnpʊt/ | 输入 | shū rù |
| processing/ˈprəʊsesɪŋ/ | 处理 | chǔ lǐ |
| output/ˈaʊtpʊt/ | 输出 | shū chū |
| Analysis/əˈnæləsɪs/ | 分析 | fēn xī |
| Coding/ˈkəʊdɪŋ/ | 编码 | biān mǎ |
| code/kəʊd/ | 代码 | dài mǎ |
| testing/ˈtestɪŋ/ | 测试 | cè shì |
| iterative testing/ˈɪtərətɪv ˈtestɪŋ/ | 迭代测试 | dié dài cè shì |
| test data/test ˈdeɪtə/ | 测试数据 | cè shì shù jù |
| abstraction/əbˈstrækʃn/ | 抽象 | chōu xiàng |
| decomposition/ˌdiːkɒmpəˈzɪʃn/ | 分解 | fēn jiě |
| design tools | 设计工具 | shè jì gōng jù |
| structure diagram/ˈstrʌktʃə ˈdaɪəɡræm/ | 结构图 | jié gòu tú |
| system/ˈsɪstəm/ | 系统 | xì tǒng |
| flowchart/ˈfləʊtʃɑːt/ | 流程图 | liú chéng tú |
| Pseudocode/ˈsuːdəʊkəʊd/ | 伪代码 | wěi dài mǎ |
| Top-down design/tɒp daʊn dɪˈzaɪn/ | 自顶向下设计 | zì dǐng xiàng xià shè jì |
| sub-tasks | 子任务 | zi rèn wù |
| IPO | 输入-处理-输出 | shū rù - chǔ lǐ - shū chū |
构建程序
- 程序分阶段构建,这个过程称为程序开发生命周期。
- 我们用设计工具规划程序,然后编写算法。
- 每个算法都可以分解为输入 → 处理 → 输出。
四个阶段
- 分析——研究问题,弄清需要什么。
- 设计——规划程序将如何运行。
- 编码——编写代码,同时逐步测试各个小部分(迭代测试)。
- 测试——用测试数据运行完成的程序,找出错误。
- 两项分析技能:抽象(只保留重要细节)和分解(把大问题分成更小的部分)。

程序开发生命周期
Step through the stages every project follows — work out what's needed, plan it, build it, then check it. Getting analysis right first saves a lot of rework later.
Put the development life cycle stages in order.
难度 3/5 · 今日首次完成可获 200 金币及少量额外奖励
Analysis (what is needed) → design (plan) → coding (write) → testing (check).
Abstraction means:
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Abstraction simplifies; decomposition breaks a problem into parts.
Match each design concept to what it means.
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
Abstraction simplifies, decomposition splits up, pseudocode plans the steps, and IPO is the overall flow.
设计工具
- 结构图——显示系统的各个部分以及它们如何组合在一起。
- 流程图——用方框和箭头按顺序显示各个步骤。
- 伪代码——用简单的、类似代码的英语描述步骤(不是一种真正的语言)。


Pseudocode is:
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Pseudocode describes an algorithm in readable, code-like English without being a real language.
输入、处理、输出
- 每个算法都可以分解为输入(输入的数据)、处理(执行的操作)和输出(结果)。
- 例如,“三个分数的平均值”:输入 3 个分数 → 将它们相加并除以 3 → 输出平均值。

Every algorithm can be decomposed into:
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Input (data in) → processing (the work) → output (the result).
例题:停车场付款机
一个停车场需要一台付款机。使用分解和输入-处理-输出方法来规划它。
- 分解将问题拆分为子任务:读取车牌号、计算费用、收取付款、打印收据。抽象只保留重要的信息:到达时间和车牌号很重要,汽车的颜色则不重要。
- 对于“计算费用”部分:输入到达和离开时间;处理:小时数 = 离开时间 − 到达时间,费用 = 小时数 × 费率;在屏幕上输出费用。
Removing details that are not needed to solve a problem is called:
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Decomposition breaks a problem into parts; abstraction removes unneeded detail.
In a flowchart, a decision is drawn as a diamond with a yes and a no exit.
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Processes are rectangles, input and output are parallelograms, and decisions are diamonds.
你掌握了
- 生命周期:分析 → 设计 → 编码 → 测试
- 抽象 = 保留重要信息;分解 = 拆分成多个部分
- 设计工具:结构图、流程图、伪代码
- 每个算法 = 输入 → 处理 → 输出
出了什么问题?只有网站团队能看到这些信息。