← 返回资讯屏轩教育 · 行业资讯

Year 9 CIE Computer Science: Case Study Practical Drill | Year 9 CIE 计算机:案例分析实战演练

2026-07-18 21:47 · 本文部分内容由AI辅助创作

📚 Year 9 CIE Computer Science: Case Study Practical Drill | Year 9 CIE 计算机:案例分析实战演练

In Cambridge IGCSE Computer Science (CIE 0478/0984), case study questions are designed to assess your analytical skills and your ability to apply computational thinking to practical problems. This drill will walk you through a complete case study from analysis to testing, using a simple scoring-to-grade system.

在剑桥IGCSE计算机科学(CIE 0478/0984)中,案例分析题旨在评估你的分析能力以及将计算思维应用于实际问题的能力。本演练将通过一个简单的分数转等级系统,带你完整经历从分析到测试的案例分析过程。

1. Understanding the Case Study | 理解案例分析

A typical case study presents a scenario and asks you to identify the key components: inputs, processes, outputs, storage, and any special constraints. You must also consider user requirements and possible errors.

典型的案例分析会给出一个情境,要求你识别关键组成部分:输入、处理过程、输出、存储以及任何特殊约束。你还必须考虑用户需求和可能出现的错误。

Start by reading the scenario carefully and highlighting the verbs – e.g., 'calculate', 'display', 'validate'. These indicate the processes you need to design.

首先仔细阅读场景,标出动词(如“计算”、“显示”、“验证”)。这些动词指示了需要设计的过程。


2. Introducing the Grading System Scenario | 介绍评分系统场景

Scenario: A school needs a program that takes a student's exam mark (an integer between 0 and 100) and outputs the corresponding grade. The grade boundaries are: A for 80–100, B for 60–79, C for 40–59, D for 0–39. If the input is outside 0–100, the program must display 'Invalid mark'.

场景:某学校需要一个程序,输入学生的考试分数(0到100之间的整数),输出对应的等级。等级划分标准为:80–100分为A,60–79分为B,40–59分为C,0–39分为D。如果输入不在0–100范围内,程序必须显示“无效分数”。

This is a classic condition-checking problem that reinforces selection statements and input validation – perfect for Year 9.

这是一个经典的条件判断问题,能强化选择语句和输入验证——非常适合Year 9学生。


3. Defining Requirements | 定义需求

Functional requirements describe what the system should do. For our program: (1) Accept a numerical mark. (2) Determine the correct grade based on the given boundaries. (3) Output the grade or an error message. Non-functional requirements: the system should handle invalid input gracefully and be easy for a non-technical user to operate.

功能需求描述了系统应该做什么。对于我们的程序:(1) 接受一个数值分数。(2) 根据给定的分数线确定正确等级。(3) 输出等级或错误消息。非功能需求:系统应优雅地处理无效输入,并且便于非技术用户操作。

Thinking about requirements before coding helps you avoid missing critical features and ensures your solution meets the examiner’s expectations.

在编写代码之前思考需求,能帮助你避免遗漏关键功能,并确保你的解决方案符合考官的期望。


广告 / Sponsored

4. Designing Inputs and Outputs | 设计输入和输出

Clearly define the type and range of inputs. In this case, the input is an integer. The expected output is one of five possible strings: 'A', 'B', 'C', 'D', or 'Invalid mark'.

明确定义输入的类型和范围。在此案例中,输入是一个整数。预期输出是五个可能字符串之一:“A”、“B”、“C”、“D”或“Invalid mark”。

We can summarise sample inputs and outputs in a table to verify our understanding:

我们可以用表格总结示例输入和输出,以验证我们的理解:

Input (Mark)Output (Grade)
85A
73B
41C
12D
-5Invalid mark
105Invalid mark

Designing the input/output interface early helps in writing accurate pseudocode and test plans.

尽早设计输入/输出接口有助于编写准确的伪代码和测试计划。


5. Developing Pseudocode | 编写伪代码

Pseudocode is a structured, language-independent way of representing an algorithm. Below is a pseudocode solution for our grading problem. Notice the use of IF–THEN–ELSE IF statements and clear variable names.

伪代码是一种结构化、独立于编程语言的算法表示方法。以下是针对我们评分问题的伪代码解决方案。注意使用了IF–THEN–ELSE IF语句和清晰的变量名。

BEGIN
  OUTPUT "Enter exam mark (0-100):"
  INPUT mark
  IF mark < 0 OR mark > 100 THEN
      OUTPUT "Invalid mark"
  ELSE
      IF mark >= 80 THEN
          grade ← "A"
      ELSE IF mark >= 60 THEN
          grade ← "B"
      ELSE IF mark >= 40 THEN
          grade ← "C"
      ELSE
          grade ← "D"
      ENDIF
      OUTPUT "Grade: ", grade
  ENDIF
END

This pseudocode follows the standard CIE recommended style: use of ← for assignment, proper indentation, and BEGIN/END markers. Always initialise variables (here, 'grade') before output.

该伪代码遵循CIE推荐的标准风格:使用←进行赋值,适当的缩进,以及BEGIN/END标记。在输出之前始终初始化变量(这里的'grade')。


6. Drawing Flowcharts | 绘制流程图

Flowcharts visually represent the algorithm's flow. They are useful for understanding decision points. A simplified flowchart for this case can be drawn as follows:

流程图以可视化方式展示算法的流程。它们有助于理解决策点。本案例的简化流程图可以绘制如下:

          +--------+
          |  Start |
          +--------+
               |
               v
        +-------------+
        | Input mark  |
        +-------------+
               |
               v
        +-----------------+
        | mark < 0 or     |--- Yes ---> +------------------+
        | mark > 100?     |             | Output "Invalid  |
        +-----------------+             | mark"            |
               | No                     +------------------+
               v                                |
        +-------------+                         v
        | mark

Published by TutorHao | Year 9 Computer Science Revision Series | aleveler.com

广告 / Sponsored
现货 Cambridge International AS & ALevel IT Coursebook剑桥国际IGC…
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥467.0

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao