📚 Case Study Practice for Year 11 Cambridge Computer Science | 剑桥 Year 11 计算机案例分析实战演练
Case study questions in the Cambridge IGCSE Computer Science exam require you to apply theoretical knowledge to real‑world scenarios. This article presents a series of practical case studies, each designed to sharpen your analytical thinking and problem‑solving skills. Work through the examples carefully, and try to answer each prompt before reading the suggested solutions.
剑桥 IGCSE 计算机科学考试中的案例分析题要求你将理论知识应用于现实场景。本文提供了一系列实战案例,每个案例都旨在锻炼你的分析思维和问题解决能力。请仔细阅读每个例子,并在查看建议答案之前尝试自行作答。
1. Autonomous Vehicle Sensor Fusion | 自动驾驶传感器融合
A self‑driving car uses an array of sensors: LiDAR, cameras, and ultrasonic sensors. The central computer must merge the data streams to build a 360° view of the environment and make instant driving decisions. Discuss how parallel processing and buffer management can be used to handle the high data throughput without loss of critical information.
一辆自动驾驶汽车使用多种传感器:激光雷达、摄像头和超声波传感器。中央计算机必须融合这些数据流,构建 360° 环境视图并即时做出驾驶决策。讨论如何利用并行处理和缓冲管理来处理高数据吞吐量,同时避免丢失关键信息。
One approach is to assign each sensor stream to a dedicated processing core, so data is filtered and interpreted in parallel. A ring buffer (circular queue) is ideal for storing the most recent sensor readings; older data is overwritten when the buffer is full. An interrupt‑driven mechanism alerts the main decision‑making algorithm whenever a new frame is ready, ensuring low latency.
一种方法是将每个传感器数据流分配给专用的处理核心,从而并行地对数据进行过滤和解读。环形缓冲区(循环队列)非常适合存储最新的传感器读数;当缓冲区满时,旧数据会被覆盖。采用中断驱动的机制,每当新的一帧数据就绪时,就通知主决策算法,从而确保低延迟。
2. School Library Database Redesign | 学校图书馆数据库重构
The school librarian currently records loans on paper. The headteacher wants a relational database to manage books, borrowers, and loans. Identify three tables that would be needed and suggest primary and foreign keys to link them. Also, write an SQL query to list all overdue books along with the borrower's name.
学校图书馆员目前用纸张记录借阅。校长希望使用关系型数据库来管理图书、借阅者和借阅记录。请列出所需的三个表,并建议主键和外键来关联它们。同时,写出一条 SQL 查询语句,列出所有逾期图书和借阅者的姓名。
ID FK, DateBorrowed, DueDate). The Loans table links the other two. An SQL query for overdue books would be: SELECT Books.Title, Borrowers.Name FROM Loans JOIN Books ON Loans.BookID = Books.BookID JOIN Borrowers ON Loans.BorrowerID = Borrowers.BorrowerID WHERE Loans.DueDate < CURRENT_DATE AND Loans.ReturnedDate IS NULL;
表可以是 Books(BookID 主键,Title,Author,ISBN),Borrowers(BorrowerID 主键,Name,FormClass),以及 Loans(LoanID 主键,BookID 外键,BorrowerID 外键,DateBorrowed,DueDate)。Loans 表连接了另外两张表。查询逾期图书的 SQL 语句为: = Borrowers.BorrowerID WHERE Loans.DueDate < CURRENT_DATE AND Loans.ReturnedDate IS NULL;
- Entity‑relationship diagram: Books —< Loans >— Borrowers (one‑to‑many relationships).
- 实体关系图:Books —< Loans >— Borrowers(一对多关系)。
3. Online Voting System Security | 在线投票系统安全
A student council election will be held online. Each student may vote only once, and the ballot must remain anonymous. Describe three security threats this system could face and suggest countermeasures for each.
学生会选举将在线举行。每位学生只能投票一次,选票必须保持匿名。请描述该系统可能面临的三种安全威胁,并针对每种威胁提出对策。
Threat 1: Unauthorised access – a student votes multiple times using fake accounts. Countermeasure: Implement two‑factor authentication with school email and a unique one‑time code sent to a verified phone number. Threat 2: Man‑in‑the‑middle attack – an attacker intercepts votes. Countermeasure: Use HTTPS with TLS encryption to secure data in transit. Threat 3: Denial of service – the server is overwhelmed with fake requests. Countermeasure: Deploy a firewall and rate‑limiting rules to filter traffic.
威胁一:未授权访问——学生使用虚假账号多次投票。对策:通过学校邮箱和发送到已认证手机号码的一次性验证码实施双因素认证。威胁二:中间人攻击——攻击者拦截选票。对策:使用带有 TLS 加密的 HTTPS 保护传输中的数据。威胁三:拒绝服务——服务器被伪造请求淹没。对策:部署防火墙和速率限制规则来过滤流量。
4. Robot Maze Navigation | 机器人迷宫导航
A robot is placed at the top‑left corner of a grid maze and must reach the bottom‑right corner. It can move up, down, left, or right, but may not pass through walls. Write pseudocode for a recursive backtracking algorithm that finds a path, marking visited cells to avoid cycles.
一个机器人被放置在网格迷宫的左上角,必须到达右下角。它可以向上、下、左、右移动,但不能穿过墙壁。请为递归回溯算法编写伪代码,寻找一条路径,并标记已访问的格子以避免循环。
FUNCTION FindPath(x, y) IF (x, y) is goal THEN RETURN TRUE
MARK cell as visited
FOR each direction (up, down, left, right) DO
IF move is valid AND cell not visited THEN
IF FindPath(newX, newY) THEN RETURN TRUE
END IF
END FOR
UNMARK cell (backtrack)
RETURN FALSE
上述伪代码展示了一种深度优先搜索方法。当到达目标时返回真;否则尝试每个可行的方向。如果所有方向都失败,则取消标记该格子并回溯。该算法能够找到一条路径(若存在),但未必是最短路径。
The pseudocode above shows a depth‑first search. It returns TRUE when the goal is reached; otherwise, it tries every feasible direction. If all directions fail, it unmarks the cell and backtracks. The algorithm will find a path if one exists, though not necessarily the shortest one.
5. Email Spam Filter Logic | 邮件垃圾过滤逻辑
An email client wants to mark incoming messages as 'spam' or 'inbox' based on keywords. Design a simple rule‑based filter using Boolean logic. For example, if the subject contains 'win' AND the body contains 'click here', mark as spam. Translate your rules into a truth table for three sample conditions.
某电子邮件客户端希望根据关键词将收到的邮件标记为“垃圾邮件”或“收件箱”。设计一个基于布尔逻辑的简单规则过滤器。例如,如果主题包含“win”且正文包含“click here”,则标记为垃圾邮件。为三个样本条件编写真值表。
Let A = subject contains 'free', B = body contains 'credit card', C = sender is not in contact list. Rule: Spam = (A AND B) OR (B AND C) OR (A AND C).
设 A = 主题含有 'free',B = 正文含有 'credit card',C = 发件人不在联系人列表中。规则:Spam = (A AND B) OR (B AND C) OR (A AND C)。
| A | B | C | Spam? |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 |
6. Campus Wi‑Fi Network Design | 校园 Wi‑Fi 网络设计
A new secondary school has three buildings. You need to provide Wi‑Fi coverage in all classrooms, the library, and the canteen. Recommend a network topology, necessary hardware, and address possible signal interference issues.
一所新建中学有三栋建筑。你需要为所有教室、图书馆和食堂提供 Wi‑Fi 覆盖。请推荐一个网络拓扑、必要的硬件,并讨论可能存在的信号干扰问题。
Recommended topology: star topology extended with multiple wireless access points (WAPs) connected via Ethernet to a central switch. Hardware required: router (connects to ISP), core switch, PoE switch to power WAPs, at least three WAPs per building (dual‑band 2.4 GHz and 5 GHz), and a wireless LAN controller to manage roaming. To minimise interference, perform a site survey, place WAPs on non‑overlapping channels (1, 6, 11 for 2.4 GHz), and adjust transmit power. Building materials such as reinforced concrete may require additional WAPs.
推荐拓扑:以星型拓扑为基础,扩展多个通过以太网连接到中央交换机的无线接入点(WAP)。所需硬件:路由器(连接互联网服务提供商)、核心交换机、为 WAP 供电的 PoE 交换机、每栋楼至少三个 WAP(双频 2.4 GHz 和 5 GHz),以及用于管理漫游的无线局域网控制器。为减少干扰,应进行现场勘测,将 WAP 设置在不重叠的信道上(2.4 GHz 的 1、6、11 信道),并调整发射功率。钢筋混凝土等建筑材料可能需要更多的 WAP。
7. Supermarket Stock Control System | 超市库存管理系统
A supermarket uses barcode scanners at checkouts. Each scan decrements the stock count in a central database. When stock falls below a reorder level, the system automatically sends an order to the supplier. Describe the input, process, output, and storage stages of this system, and explain how it illustrates the 'online' processing model.
一家超市在收银台使用条形码扫描器。每次扫描都会减少中央数据库中的库存数量。当库存降至补货水平以下时,系统会自动向供应商发送订单。请描述该系统的输入、处理、输出和存储阶段,并说明它如何体现“在线”处理模式。
Input: product barcode captured by the scanner, quantity sold. Process: the system looks up the product, verifies the price, reduces the stock count by the quantity sold, and checks if the new stock level is below the reorder threshold. Output: till receipt displayed/printed, and if necessary, a purchase order file sent to the supplier. Storage: product master file (barcode, description, unit price, stock level, reorder level), transaction log, and supplier details. The system is online because each transaction updates the master file immediately, so stock levels are always current.
输入:扫描器获取的商品条形码、销售数量。处理:系统查找该商品、验证价格、将库存数量减去售出数量,并检查新库存水平是否低于补货阈值。输出:显示/打印的收据,必要时发送给供应商的采购订单文件。存储:商品主文件(条形码、描述、单价、库存水平、补货水平)、交易日志和供应商详情。该系统是在线的,因为每笔交易都会立即更新主文件,因此库存水平始终是最新的。
8. Operating System Memory Management Simulation | 操作系统内存管理模拟
You are given a main memory of 16 units and the following process requests: P1 needs 5 units, P2 needs 7 units, P3 needs 4 units, P4 needs 3 units. They arrive at times 0, 2, 4, and 6 respectively. Show how memory would be allocated using contiguous allocation with first‑fit, and calculate external fragmentation after all processes are loaded (assume no deallocation). How would paging solve the fragmentation problem?
假设主存有 16 个单元,并有以下进程请求:P1 需要 5 个单元,P2 需要 7 个单元,P3 需要 4 个单元,P4 需要 3 个单元。它们分别在时刻 0、2、4、6 到达。请展示使用首次适应连续分配时内存的分配情况,并计算所有进程加载后的外部碎片(假设没有释放)。分页技术将如何解决碎片问题?
First‑fit: At time 0, P1 occupies addresses 0‑4. At time 2, P2 needs 7 units; the first hole large enough starts at 5, so P2 occupies 5‑11. At time 4, P3 needs 4; the next hole starts at 12, so P3 occupies 12‑ ther free space; combined free space = 1 unit, fragmented. Paging eliminates external fragmentation by dividing memory into fixed‑ logical pages to any free physical frame, so a process need not occupy contiguous memory.
首次适应:时刻 0,P1 占用地址 0‑4。时刻 2,P2 需要 7 个单元;第一个足够大的空闲区从 5 开始,因此 P2 占用 5‑11。时刻 4,P3 需要 4;下一个空闲区从 12 开始,P3 占用 12‑15。时刻 6,P4 需要 3,但没有连续的 3 个空闲单元,因此 P4 必须等待。外部碎片:16 号单元空闲但不与其他空闲区连续;总空闲空间 = 1 个单元,呈碎片化。分页通过将内存划分为固定大小的帧,并将进程划分为相同大小的页,从而消除了外部碎片。页表将逻辑页映射到任意空闲物理帧,因此进程无需占用连续内存。
9. File Encryption Using XOR Cipher | 使用 XOR 密码进行文件加密
A student wishes to encrypt a text file before storing it on a USB drive. They choose a simple XOR cipher using a repeating keyword. Explain the encryption process with an example using the plaintext 'HELLO' and key 'KEY'. What are two weaknesses of this method, and how could it be strengthened?
一名学生希望在将文本文件存储到 U 盘之前对其进行加密。他选择使用重复关键词的简单 XOR 密码。请通过一个例子说明加密过程,使用明文 "HELLO" 和密钥 "KEY"。这种方法有哪两个弱点?如何加强?
Each character is converted to ASCII (e.g., 'H'=72, 'E'=69, 'K'=75, etc.). The key 'KEY' XOR 69 = 10. The ciphertext is a sequence of these values. Weakness 1: frequency analysis—if the plaintext is English, repeating patterns reveal the key length. Weakness 2: known‑plaintext attack— t of the plaintext, they can derive the key. Strengthening: use a longer, truly random one‑time pad key that is never reused, or switch to a modern symmetric algorithm such as AES.
每个字符转换为其 ASCII 码(例如 'H'=72, 'E'=69, 'K'=75 等)。密钥 'KEY' 被重复:K E Y K E。异或运算:72 XOR 75 = 3,69 XOR 69 = 0,76 XOR 89 = 21,76 XOR 75 = 7,79 XOR 69 = 10。密文是这些值的序列。弱点 1:频率分析——如果明文是英语,重复的模式会暴露密钥长度。弱点 2:已知明文攻击——如果攻击者知道部分明文,就可以推导出密钥。加强方法:使用更长的、真正随机且永不重用的一次性密码本密钥,或者改用现代对称算法,如 AES。
10. Weather Station Data Transmission | 气象站数据传输
A remote weather station sends temperature, humidity, and wind speed readings to a central server every 10 minutes via a satellite link. The data packet structure must include error detection and a timestamp. Design a packet format, explain how a checksum would be calculated on the transmission, and discuss what would happen if the checksum at the receiver does not match.
一个远程气象站每 10 分钟通过卫星链路向中央服务器发送温度、湿度和风速读数。数据包结构必须包含错误检测和时间戳。设计一个数据包格式,解释如何在传输时计算校验和,并讨论如果接收端的校验和不匹配会发生什么。
A possible packet structure: Header (start bit, packet ID), Payload (timestamp as 4‑byte Unix time, temperature as 2‑byte integer in tenths of degree, humidity as 1‑byte percentage, wind speed as 2‑byte integer in tenths of m/s), and Trailer (checksum as 2‑byte value, end bit). Checksum calculation: sum all payload bytes, discard overflow beyond 16 bits, then take the one's complement of the sum. The sender appends this value. At the receiver, the same calculation is performed including the received checksum; if the result is zero, no error is detected. If non‑zero, the packet is discarded and a retransmission request is sent (automatic repeat request).
一种可能的数据包结构:头部(起始位,包标识)、有效载荷(时间戳为 4 字节 Unix 时间,温度为 2 字节的十分之一度整数,湿度为 1 字节百分比,风速为 2 字节的十分之一米/秒整数)和尾部(校验和为 2 字节值,结束位)。校验和计算:将所有有效载荷字节相加,丢弃超过 16 位的溢出,然后取和的反码(one's complement)。发送方附加该值。接收方执行相同计算,包括接收到的校验和;若结果为零,则未检测到错误。若非零,则丢弃该数据包并请求重传(自动重传请求)。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图