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

Year 13 CAIE Computer Science: Case Study Practical Drills | Year 13 CAIE 计算机:案例分析实战演练

2026-07-23 13:32 · 本文部分内容由AI辅助创作

📚 Year 13 CAIE Computer Science: Case Study Practical Drills | Year 13 CAIE 计算机:案例分析实战演练

In CAIE A-Level Computer Science (9618), Paper 4 is a written practical paper built around a scenario that Cambridge publishes in advance as pre-release material. This article turns that scenario into a systematic, step-by-step practical drill, using a library book management system as the running example, so that you can read the brief like an examiner, design like a programmer, and write like a candidate who knows exactly where the marks are.

在 CAIE A-Level 计算机科学(9618)考试中,Paper 4 是一场以场景为核心的笔试实践卷,剑桥会提前以"预发布材料"的形式公布该场景。本文把这份材料变成系统化的逐步实战演练,以图书馆图书管理系统为贯穿案例,帮助你能像考官一样读题、像程序员一样设计、像懂得分点的考生一样作答。

1. Understanding the Problem Statement | 理解问题陈述

Read the pre-release material three times, each time with a different purpose: once for the story, once to list the objects and the verbs that act on them, and once to underline every constraint. In our scenario the objects are books and members; the verbs are add, issue, return and report; the constraints are a maximum of 1000 books and persistent storage in a text file.

请把预发布材料读三遍,每遍目的不同:第一遍读故事情节,第二遍列出其中的对象以及作用于对象的动词,第三遍划出所有约束条件。在我们的场景里,对象是"图书"和"会员",动词是"添加、借出、归还、生成报告",约束则是最多 1000 本书、数据必须持久保存在文本文件中。

Separate the scenario from the question. The scenario gives context and data formats; the examination question adds the actual tasks and marks. A phrase such as 'the program must allow a member to borrow no more than five books at a time' is a task to implement, not decorative background.

要把"场景"与"题目"区分开。场景提供背景与数据格式,真正的任务和分值由考题给出。像"程序必须允许每位会员同时最多借阅五本书"这样的表述,是需要实现的任务,而不是装饰性背景。

Finally, note the command words. 'State' needs a short answer, 'describe' needs a point plus a consequence, 'explain' needs a reason chain, and 'write pseudocode' needs structured, indented, complete logic that a reader could follow without guessing.

最后要注意指令词。"State(陈述)"只需简短作答,"describe(描述)"需要一个要点加一个后果,"explain(解释)"需要原因链条,而"write pseudocode(编写伪代码)"需要结构清晰、缩进规范、逻辑完整,读者无需猜测就能读懂。


2. Inputs, Outputs, Constraints and Assumptions | 输入、输出、约束与假设

Before designing anything, tabulate the data. Writing the table forces you to decide data types early, which prevents the most common Paper 4 error: storing a numeric field as a string and then being unable to compare it.

在设计任何东西之前,先把数据列成表格。制表会迫使你尽早确定数据类型,从而避免 Paper 4 最常见的错误之一:把数值字段存成字符串,结果无法比较大小。

Element 元素Example 示例Type 类型Notes 说明
Book ID 图书编号"BK00127"STRINGUnique, 7 characters 唯一,7 位
Title 书名"The Silk Roads"STRINGUp to 60 characters 最多 60 字符
Author 作者"P. Frankopan"STRINGFree text 自由文本
Year published 出版年2015INTEGERRange check 需范围校验
On loan 是否借出TRUE / FALSEBOOLEANFlag, not text 用标志位
Borrower 借阅人"MB0451"STRINGEmpty means available 空表示在库

State your assumptions explicitly in the examination, for example 'assuming the file already exists and contains one record per line'. Examiners credit reasonable, clearly stated assumptions far more readily than silent invention.

在考试中要明确写出你的假设,例如"假设文件已存在且每行一条记录"。相比默不作声地自行发挥,考官更愿意给那些合理且写清楚的假设加分。

广告 / Sponsored


3. Designing Data Structures | 设计数据结构

There are two standard designs for a record-based scenario in the CAIE pseudocode style: parallel arrays and an array of records. Parallel arrays are quicker to write under time pressure; an array of records is easier to keep consistent and easier to swap when sorting.

在 CAIE 伪代码风格下,处理"记录型"场景有两种标准设计:并行数组与记录数组。并行数组在时间压力下写得更快;记录数组更容易保持一致,排序时交换数据也更简单。

// Design A: parallel arrays (parallel arrays must stay in step)
CONSTANT MAX_BOOKS = 1000
DECLARE BookID : ARRAY[1:MAX_BOOKS] OF STRING
DECLARE Title : ARRAY[1:MAX_BOOKS] OF STRING
DECLARE OnLoan : ARRAY[1:MAX_BOOKS] OF BOOLEAN
DECLARE Borrower : ARRAY[1:MAX_BOOKS] OF STRING
DECLARE BookCount : INTEGER
BookCount ← 0

// Design B: array of records (composite data type)
TYPE BookRecord
  DECLARE BookID : STRING
  DECLARE Title : STRING
  DECLARE OnLoan : BOOLEAN
  DECLARE Borrower : STRING
ENDTYPE
DECLARE Library : ARRAY[1:MAX_BOOKS] OF BookRecord

Use BookCount rather than a fixed 1000 when looping. Writing 'FOR i ← 1 TO 1000' over unused slots is a mark-losing habit: it wastes processing time and it will read empty strings and uninitialised values into your reports.

循环时要用 BookCount,而不是写死的 1000。用"FOR i ← 1 TO 1000"去遍历空槽位是丢分的坏习惯:既浪费处理时间,又会把空字符串和未初始化值读进报告里。

Declare array bounds explicitly and stay consistent with the indexing convention used in the syllabus pseudocode, which defaults to 1-based indexing. Mixing 0-based and 1-based logic halfway through a question is an easy way to lose accuracy marks on every subsequent line.

要显式声明数组下标范围,并与大纲伪代码默认的"从 1 开始"索引保持一致。在一道题中途把 0 基与 1 基混用,是让之后每一行都丢掉准确性分数的简便方法。


4. Modular Design and Top-Down Decomposition | 模块化设计与自顶向下分解

Decompose the problem into a top-level menu plus one procedure per verb, and one function per reusable question. The top level should read almost like the scenario text itself, which makes it easy for the examiner to award structure marks.

把问题分解为一个顶层菜单,外加每个"动词"对应一个过程、每个可复用的提问对应一个函数。顶层结构读起来几乎就像场景文本本身,这样考官很容易给出结构分。

PROCEDURE Main()
  LoadBooks()
  REPEAT
    Choice ← ShowMenu()
    CASE Choice OF
      1 : AddBook()
      2 : IssueBook()
      3 : ReturnBook()
      4 : GenerateReport()
    ENDCASE
  UNTIL Choice = 5
  SaveBooks()
ENDPROCEDURE

Decide how data moves between modules. In CAIE pseudocode, parameters are passed BYVALUE by default; if a procedure must change an array, a counter, or a record, pass it BYREF, otherwise the change is lost when the procedure ends.

要确定数据如何在模块之间流动。在 CAIE 伪代码中,参数默认按值传递(BYVALUE);如果某个过程必须修改数组、计数器

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

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

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