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

A-Level AQA Computer Science: Typical Example Questions Detailed Explanation | A-Level AQA 计算机科学:典型例题详解

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

📚 A-Level AQA Computer Science: Typical Example Questions Detailed Explanation | A-Level AQA 计算机科学:典型例题详解

This guide walks through a selection of typical AQA A-level Computer Science example questions, breaking down key concepts, common pitfalls, and marking points. Each section presents a representative problem, followed by a step-by-step solution that models the depth and precision expected in the exam.

本文精选 AQA A-level 计算机科学典型例题,拆解核心概念、常见陷阱和得分要点。每个小节提供一道代表性题目,并逐步展示符合考试要求的解答深度与准确性,帮助考生高效备考。

1. Data Structures: Linked Lists vs Arrays | 数据结构:链表与数组

A common question asks you to compare the use of a singly linked list with a static array for storing a dynamic collection of records. You must explain the memory implications and efficiency of insertion and deletion.

题目常要求比较单链表和静态数组在存储动态记录集合时的使用。你需要解释内存影响以及插入和删除操作的效率。

For the array, memory is allocated contiguously at compile time. Inserting an element in the middle requires shifting all subsequent elements, which has a time complexity of O(n). Deletion also involves shifting, so it is O(n). However, direct access by index is O(1).

数组在编译时分配连续内存。在中间插入元素需要移动后续所有元素,时间复杂度为 O(n),删除同理。但按索引直接访问是 O(1)。

A singly linked list stores each node in non-contiguous memory with a pointer to the next node. Insertion at a given position only requires adjusting pointers, which is O(1) once the position is located. Searching is O(n) because you must traverse nodes sequentially. Memory overhead is larger due to storing pointers alongside data.

单链表的每个节点存储在不连续的内存中,包含指向下一节点的指针。在给定位置插入只需调整指针,定位后操作为 O(1)。搜索需要遍历,故为 O(n)。因需额外存储指针,内存开销更大。

Exam tip: Always relate your answer to the context – if the collection size is unpredictable and frequent insertions/deletions occur in the middle, the linked list is preferable. If fast random access is needed, choose the array.

应试提示:答案务必结合上下文——若集合大小不可预测且频繁在中间插入/删除,优先选择链表;若需快速随机访问,则选用数组。


2. Algorithm Analysis: Big O Notation | 算法分析:大 O 表示法

You might be given a nested loop algorithm and asked to determine its time complexity. Let's consider a function that processes a 2D array of size n × m.

题目可能给出一段嵌套循环算法,要求确定时间复杂度。考虑处理一个 n × m 的二维数组的函数。

Example code fragment:
for i = 0 to n-1
  for j = 0 to m-1
    array[i][j] = i * j

代码片段示例:
for i = 0 to n-1
  for j = 0 to m-1
    array[i][j] = i * j

tions = n × m. Time complexity is O(nm). If the array is square (n = m), it becomes O(n²).

外层循环执行 n 次;内层循环每次执行 m 次。总操作数 = n × m,时间复杂度为 O(nm)。若为方阵(n=m),则为 O(n²)。

thms like binary search, the recurrence relation is T(n) = T(n/2) + O(1), giving O(log n).

分析递归算法如二分查找时,递推关系 T(n) = T(n/2) + O(1) 得出 O(log n)。

Common pitfalls: Confusing O(2ⁿ) with O(n²) – exponential growth is much faster. Also, dropping constants: O(3n) simplifies to O(n).

常见错误:混淆 O(2ⁿ) 与 O(n²)——指数增长快得多。另外,常数可忽略:O(3n) 简化为 O(n)。


3. Searching and Sorting Algorithms | 搜索与排序算法

Trace the execution of the quicksort algorithm on the list [8, 4, 7, 3, 6, 2, 5] using the first element as the pivot.

跟踪快速排序算法对列表 [8,4,7,3,6,2,5] 的执行过程,以首元素为枢轴。

ub-list left: [4,7,3,6,2,5] (all ≤8). Right: [] (none >8). Recursively sort left sub-list.

步骤1:枢轴=8。左子列表:[4,7,3,6,2,5](所有 ≤8)。右子列表:[](无 >8)。递归排序左子列表。

Step 2: Pivot = 4. Left of 4: [3,2], right: [7,6,5]. Continue until base case (size ≤1).

步骤2:枢轴=4。4 左侧:[3,2],右侧:[7,6,5]。继续直至基本情况(长度≤1)。

The sorted list emerges as [2,3,4,5,6,7,8]. Quicksort average O(n log n), worst-case O(n²) with bad pivot choices.

排序后列表为 [2,3,4,5,6,7,8]。快速排序平均 O(n log n),枢轴选择不佳时最坏 O(n²)。

Also know binary search: requires a sorted array, repeatedly halves the search interval, O(log n). For the same sorted list, search for 6: middle index initially 3 (value 5). 6>5, so search right half.

同样需掌握二分查找:要求有序数组,反复将查找区间减半,O(log n)。对同一有序列表查找 6:起始中间索引 3(值为 5)。6>5,因此查找右半部分。


4. Recursion and Stack Frames | 递归与栈帧

Explain what happens in memory when the recursive function factorial(4) is called.

解释递归函数 factorial(4) 被调用时内存中的情况。

h frame waits for the next call to return. The stack unwinds: 1*1=1, 2*1=2, 3*2=6, 4*6=24.

每次调用压入一个新栈帧,包含参数 n 和返回地址。factorial(4) 调用 factorial(3),再依次调用 factorial(2)、factorial(1),最后 factorial(0) 返回 1。每帧等待下一调用返回。栈展开:1*1=1,2*1=2,3*2=6,4*6=24。

If recursion depth exceeds the stack limit, a stack overflow error occurs. Tail recursion can be optimised by the compiler to reuse the same stack frame.

若递归深度超过栈限制,则发生栈溢出错误。尾递归可被编译器优化以复用同一栈帧。


5. Object-Oriented Programming: Inheritance and Polymorphism | 面向对象编程:继承与多态

Given a base class Vehicle with a method move(), and derived classes Car and Bicycle that override move(), demonstrate polymorphic behaviour.

给定基类 Vehicle 含方法 move(),派生类 Car 和 Bicycle 重写 move(),展示多态行为。

A reference variable of type Vehicle can point to a Car or Bicycle object. At runtime, the call to move() invokes the overridden method specific to the actual object type, not the reference type. This is dynamic binding.

类型为 Vehicle 的引用变量可指向 Car 或 Bicycle 对象。运行时,对 move() 的调用将调用实际对象类型所重写的方法,而非引用类型的方法。此为动态绑定。

Key terms: Encapsulation (data hiding), inheritance (reusing attributes and methods), polymorphism (many forms). UML class diagrams often appear, showing inheritance arrows (open triangle).

关键术语:封装(数据隐藏)、继承(复用属性和方法)、多态(多种形态)。UML 类图常出现,显示继承箭头(空心三角)。


广告 / Sponsored

6. Finite State Machines | 有限状态机

Design a finite state machine (FSM) for a simple vending machine that accepts coins of 10p and 20p and dispenses a 30p drink. Clearly label the states and transitions.

为自动售货机设计有限状态机,接受 10p 和 20p 硬币,售出 30p 饮料。清楚标注状态及转换。

sert 10p → Dispensing; insert 20p → Dispensing (and give 10p change if required, then 0p).

状态:0p(初始)、10p、20p、出货。从 0p,投 10p 转至 10p;投 20p 转至 20p。从 10p,投 10p → 20p;投 20p → 出货(总达 30p,出饮料并返回 0p)。从 20p,投 10p → 出货;投 20p → 出货(如需找零 10p,然后 0p)。

FSMs can be represented as state transition diagrams (circles for states, arrows with input/output) or as a transition table. AQA often asks to draw or interpret such diagrams.

FSM 可用状态转换图(圆圈表状态,箭头标输入/输出)或转换表表示。AQA 常要求绘制或解读此类图表。


7. Boolean Algebra and Logic Gates | 布尔代数与逻辑门

Simplify the Boolean expression F = A·B + A·(¬B) using algebraic laws, and draw the resulting logic circuit.

使用代数定律化简布尔表达式 F = A·B + A·(¬B),并画出结果逻辑电路。

Apply the distributive law: F = A·(B + ¬B). Since B + ¬ = 1, F = A·1 = A. The expression simplifies to just A. The logic circuit is a single wire – no gates needed.

应用分配律:F = A·(B + ¬B)。因 B + ¬B = 1,即 F = A·1 = A。表达式化简为 A。逻辑电路仅需一条导线——无需门。

all combinations of A and B; the output column matches A. Also be familiar with De Morgan's laws: ¬(A·B) = ¬A + ¬B, ¬(A+B) = ¬A·¬B.

真值表列出 A 与 B 所有组合;输出列与 A 一致。还须熟悉德摩根定律:¬(A·B) = ¬A + ¬B,¬(A+B) = ¬A·¬B。


8. Computer Architecture: Von Neumann and Fetch-Execute Cycle | 计算机体系结构:冯·诺依曼与取指执行周期

Describe the fetch-execute cycle, referring to the special-purpose registers involved.

描述取指-执行周期,并提及涉及的特殊寄存器。

The cycle begins: Program Counter (PC) holds the address of the next instruction. Its content is copied to the Memory Address Register (MAR), then PC is incremented. The control unit triggers a read, and the instruction is placed into the Memory Data Register (MDR), then copied to the Current Instruction Register (CIR). The instruction is decoded, and if an operand address is present, it may be loaded via MAR/MDR. The instruction is then executed by the ALU or control logic. The process repeats.

周期开始:程序计数器(PC)存放下一条指令地址。其内容复制到存储器地址寄存器(MAR),随后 PC 递增。控制单元触发读操作,指令放入存储器数据寄存器(MDR),再复制到当前指令寄存器(CIR)。指令被译码,若存在操作数地址,可能通过 MAR/MDR 加载。然后指令由 ALU 或控制逻辑执行。重复此过程。

Von Neumann architecture uses a single shared bus for instructions and data, leading to the “von Neumann bottleneck”. Contrast with Harvard architecture.

冯·诺依曼体系结构使用单条共享总线传输指令和数据,导致“冯·诺依曼瓶颈”。可与哈佛体系结构对比。


9. Networks: TCP/IP Stack and Protocols | 网络:TCP/IP 协议栈

Explain how the TCP/IP model differs from the OSI model and describe the role of the transport layer.

解释 TCP/IP 模型与 OSI 模型的差异,并描述传输层的作用。

TCP/IP has four layers: Application, Transport, Internet (or Network), and Link. The OSI model has seven layers. The transport layer (e.g., TCP, UDP) provides end-to-end communication, port addressing, reliability (via acknowledgements and retransmissions with TCP), and flow control. The internet layer handles logical addressing (IP) and routing.

TCP/IP 分为四层:应用层、传输层、互联网层(网络层)和链路层。OSI 模型有七层。传输层(如 TCP、UDP)提供端到端通信、端口编址、可靠性(TCP 通过确认与重传)和流量控制。互联网层处理逻辑编址(IP)与路由。

An example question: “Explain what is meant by packet switching”. It means data is split into packets, each transmitted independently, possibly via different routes, and reassembled at the destination.

典型题目:“解释什么是分组交换”。指数据被分成数据包,各自独立传输,可能经不同路由,在目的地重组。


10. Databases: SQL Queries and Normalization | 数据库:SQL 查询与规范化

Given a table Students(ID, Name, Form, FormTutor), write SQL to retrieve names of students in Form 10A, ordered alphabetically.

给定表 Students(ID, Name, Form, FormTutor),写出 SQL 检索 Form 为 10A 的学生姓名,并按字母排序。

SELECT Name FROM Students WHERE Form = '10A' ORDER BY Name ASC;

SELECT Name FROM Students WHERE Form = '10A' ORDER BY Name ASC;

Normalization: to achieve 3NF, eliminate transitive dependencies. In Students, FormTutor depends on Form, not directly on the key ID. So split into Students(ID, Name, Form) and FormInfo(Form, FormTutor).

规范化:为达到第三范式(3NF),消除传递依赖。Students 表中,FormTutor 依赖 Form,而非直接依赖主键 ID。因此拆分为 Students(ID, Name, Form) 和 FormInfo(Form, FormTutor)。


11. Programming Paradigms: Imperative vs Functional | 编程范式:命令式与函数式

Contrast imperative and functional programming styles using the example of calculating the sum of squares of a list [1,2,3].

以计算列表 [1,2,3] 的平方和为例,对比命令式与函数式编程风格。

Imperative approach (pseudocode):
total = 0
for each x in list:
  total = total + x*x

命令式方法(伪代码):
total = 0
for each x in list:
  total = total + x*x

Functional approach (using map and reduce):
square(x) = x * x
list_squares = map(square, list)
result = reduce(sum, list_squares, 0)

函数式方法(使用 map 和 reduce):
square(x) = x * x
list_squares = map(square, list)
result = reduce(sum, list_squares, 0)

Imperative emphasises state changes and sequential steps; functional emphasises expressions, immutability, and higher-order functions. AQA may ask to evaluate trade‑offs in readability and efficiency.

命令式强调状态变化与顺序步骤;函数式强调表达式、不可变性和高阶函数。AQA 可能要求评估可读性与效率的权衡。


12. Ethics and Legal Issues in Computing | 计算中的伦理与法律问题

Discuss the impact of the General Data Protection Regulation (GDPR) on software developers storing personal data.

讨论《通用数据保护条例》(GDPR)对存储个人数据的软件开发人员的影响。

GDPR requires explicit consent for data collection, the right to access and erasure, data portability, and breach notification. Developers must implement privacy by design, ensure encryption, and maintain audit trails. Non-compliance can lead to fines up to 4% of annual global turnover.

GDPR 要求数据收集须明确同意,赋予访问权、删除权、数据可携权以及数据泄露通知义务。开发人员须实施隐私设计,确保加密并保留审计追踪。违规可被处以全球年营业额 4% 的罚款。

Other topics include the Computer Misuse Act, copyright/patents for software, and environmental effects of e-waste. Always structure answers with a balanced argument.

其他主题包括《计算机滥用法》、软件的版权/专利以及电子废弃物的环境影响。答题时务必组织正反论点,保持平衡论述。

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

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

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

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