📚 Pre-U Edexcel Computer Science: Case Study Practical Exercises | Pre-U Edexcel 计算机:案例分析实战演练
Case study analysis is a core skill assessed in Pre-U Edexcel Computer Science, demanding that learners dissect real‑world scenarios to propose robust, well‑reasoned digital solutions. This article walks through a complete practical exercise centred on designing a library management system, modelling the full software development lifecycle from requirements gathering through to testing and ethical evaluation. By following each stage, you will strengthen your ability to interpret problem contexts, apply computational thinking, and justify design decisions under exam conditions.
案例分析是 Pre‑U Edexcel 计算机科学中考查的核心能力,要求学习者剖析真实场景,提出稳健且有理有据的数字化解决方案。本文将以设计一个图书馆管理系统为完整实战演练,模拟从需求获取到测试与伦理评估的全软件开发周期。通过逐步跟进,你将强化解读问题情境、运用计算思维以及在考试条件下论证设计决策的能力。
1. Understanding the Case Narrative | 理解案例情境
Our fictitious school, Greenfield Academy, currently relies on paper‑based records for book loans, returns and inventory. Students borrow titles via a handwritten slip, which often leads to lost records, overdue fines being overlooked and inventory mismatches. The headteacher has commissioned a digital library management system (LMS) that will be accessible via school intranet and allow both self‑service kiosks in the library and remote access from classrooms. The system must track all books and borrowers, calculate fines automatically, and generate booking reports.
我们虚构的格林菲尔德学院目前仍采用纸质记录管理图书借阅、归还和库存。学生通过手写借条借阅,常导致记录丢失、逾期罚款遗漏及库存数量不符。校长委托开发一套可在校内网访问的数字图书馆管理系统 (LMS),既支持馆内自助终端也允许教室远程访问。系统需追踪所有图书与借阅者、自动计算罚款并生成借阅报告。
2. Eliciting Functional Requirements | 提取功能需求
Functional requirements describe what the system should do. From staff interviews and student surveys, we identify: register and authenticate borrowers; search the catalogue by title, author or ISBN; check out a book, which decrements available copies and logs a due date; check in a returned book; automatically compute an overdue fine at £0.10 per day; send email reminders 3 days before the due date and on the due date; and allow librarians to add, edit or remove book records.
功能需求描述系统应该做什么。通过教职工访谈和学生问卷,我们识别出:注册与认证借阅者;按书名、作者或 ISBN 搜索目录;借出图书,扣减可用复本数量并记录应还日期;归还图书;自动按每日 £0.10 计算逾期罚款;于到期前 3 天及到期日发送提醒邮件;允许管理员添加、编辑或删除图书记录。
3. Specifying Non‑functional Requirements | 明确非功能需求
Non‑functional requirements define quality attributes. The system must support up to 200 concurrent users during peak borrowing times, respond to a catalogue search within 2 seconds, store data for at least five academic years, protect personal data in line with the UK Data Protection Act 2018, and be usable by Year‑7 students with minimal training. The web interface must comply with WCAG 2.1 AA accessibility standards.
非功能需求定义质量属性。系统需在借阅高峰期支持最多 200 并发用户,目录搜索响应在 2 秒内,数据保留至少五个学年,依据英国《2018 年数据保护法》保护个人信息,且界面需让七年级学生经最少培训即可使用。网页界面须符合 WCAG 2.1 AA 无障碍标准。
4. Process Modelling with Flowcharts | 流程图过程建模
We map the core borrow‑book operation with a flowchart. Start → Borrower scans RFID card → System validates membership → If membership is valid, prompt to scan book barcode; else display error and return to start. → Check item availability; if no copies available, offer reservation. → If available, confirm loan, decrement stock count by 1, set due ← today + 14 days, insert record into Loans table. → Print receipt. → End.
我们用流程图描绘核心借书操作。开始 → 借阅者扫 RFID 卡 → 系统验证会籍 → 若会籍有效,提示扫描图书条形码;否则显示错误并返回开始。 → 检查馆藏可借数;若无可用复本,提供预约。 → 若可借,确认借出,库存量减 1,设定到期日 ← 今天 + 14 天,向 Loans 表插入记录。 → 打印凭条。 → 结束。
5. Entity‑Relationship Modelling | 实体关系建模
The database design centres on four main entities: Borrower (BorrowerID, Name, YearGroup, Email, RFIDTag), Book (ISBN, Title, Author, PublicationYear, Genre, TotalCopies, AvailableCopies), Loan (LoanID, BorrowerID, ISBN, DateOut, DateDue, DateReturned, FineAmount, Paid) and Reservation (ReservationID, BorrowerID, ISBN, ReservationDate, Status).
数据库设计围绕四个主要实体:Borrower(BorrowerID, Name, YearGroup, Email, RFIDTag),Book(ISBN, Title, Author, PublicationYear, Genre, TotalCopies, AvailableCopies),Loan(LoanID, BorrowerID, ISBN, DateOut, DateDue, DateReturned, FineAmount, Paid)及Reservation(ReservationID, BorrowerID, ISBN, ReservationDate, Status)。
6. Algorithm for Overdue Fine Calculation | 逾期罚款计算算法
Pseudocode for a daily batch job:
FOR each loan in Loans WHERE DateReturned IS NULL
overdueDays = TODAY – DateDue
IF overdueDays > 0 THEN
fine = overdueDays * 0.10
UPDATE Loans SET FineAmount = fine WHERE LoanID = loan.LoanID
END IF
END FOR. The algorithm runs at midnight; an alternative event‑driven approach would recalculate on check‑in to avoid stale fines.
每日批处理作业的伪代码:
FOR Loans 表中每条 DateReturned 为空的记录
overdueDays = 当前日期 − DateDue
IF overdueDays > 0 THEN
fine = overdueDays × 0.10
UPDATE Loans SET FineAmount = fine WHERE LoanID = loan.LoanID
END IF
END FOR。算法于午夜运行;替代的事件驱动方式可在归还时即时重算以避免陈旧罚款。
7. User Interface Prototyping | 用户界面原型
We sketch a search‑focused homepage with a prominent search bar at the top. Below it, a grid of book covers acts as quick links to popular titles. A self‑service kiosk variant strips navigation to three buttons: Borrow, Return and My Account. Each screen follows a clear, hierarchical layout with large touch targets (min 48×48 px), high‑contrast text and text‑to‑speech support for inclusion.
我们设计一个以搜索为中心的首页,顶部有突出搜索栏。下方以图书封面网格作为热门书快捷入口。自助终端版本精简导航为三个按钮:借书、还书 和 我的账户。每个界面采用清晰层级式布局,使用大触摸目标(至少 48×48 px)、高对比度文字,并提供文字转语音支持以实现包容性。
8. Testing Strategy: Black‑box and White‑box | 测试策略:黑盒与白盒
Black‑box testing targets functional requirements: boundary value analysis for overdue fines (0 days overdue → £0; 1 day → £0.10; 367 days → £36.70), equivalence partitioning for borrower year groups, and decision table testing for membership rules. White‑box testing exercises the fine‑calculation loop with statement coverage and branch coverage, ensuring the IF condition is tested for true and false.
黑盒测试针对功能需求:逾期罚款的边界值分析(逾期 0 天 → £0;1 天 → £0.10;367 天 → £36.70),借阅者年级的等价类划分,以及会籍规则的决策表测试。白盒测试覆盖罚款计算循环,使用语句覆盖和分支覆盖,确保 IF 条件真假分支均被测试。
9. Security and Data Protection | 安全与数据保护
We apply role‑based access control: librarians have write access to book records; students can only read the catalogue and view their own loans. Data in transit is protected via TLS (HTTPS), and passwords are stored salted and hashed using bcrypt. The system logs all access attempts for audit. Application logic guards against SQL injection by using parameterised queries and validates all input on the server side.
我们采用基于角色的访问控制:管理员对图书记录有写权限;学生只能浏览目录和查看自己的借阅记录。传输数据经 TLS (HTTPS) 保护,密码用 bcrypt 加盐哈希后存储。系统记录所有访问尝试以供审计。应用逻辑通过参数化查询防止 SQL 注入,并在服务器端校验所有输入。
10. Ethical, Legal and Environmental Considerations | 伦理、法律与环境考量
Ethical issues include digital divide effects: the school must provide alternative offline borrowing during network outages so no student is excluded. Data minimisation is required under GDPR; hence only necessary borrower data is collected. Environmentally, the system reduces paper slips by 95 %, but the RFID tags and server energy footprint must be offset by using energy‑efficient hardware and a dark‑mode interface.
伦理问题包括数字鸿沟影响:学校需在网络故障时提供离线借阅替代方案,避免学生无法借书。GDPR 要求数据最小化,因此只收集必要的借阅者信息。环境方面,系统减少 95% 的纸质借条,但 RFID 标签与服务器能耗需通过使用节能硬件和暗色界面来抵消。
11. Implementation Technology Stack | 实现技术栈选择
A prototype could be built with a three‑tier architecture: a PostgreSQL database, a Python Flask REST API serving JSON, and a React front end. The self‑service kiosk uses a Raspberry Pi with a touchscreen, calling the same API. Code is version‑controlled via Git and hosted on a school intranet server running Ubuntu, allowing continuous delivery through GitHub Actions.
原型可采用三层架构构建:PostgreSQL 数据库,提供 JSON 的 Python Flask REST API,以及 React 前端。自助终端使用带触摸屏的树莓派,调用相同 API。代码用 Git 版本控制,托管于校内部署 Ubuntu 的服务器,通过 GitHub Actions 实现持续交付。
12. Evaluation and Exam Insights | 评估与考试洞察
Post‑implementation evaluation measures usability (System Usability Scale survey), performance (load testing with 200 virtual users) and cost (actual fine collection accuracy). In an Edexcel examination, always link your design back to the scenario: justify why a relational database was chosen over a flat file, how the interface supports younger users, and what trade‑offs you made between security and convenience.
实现后评估衡量可用性(系统可用性量表调查)、性能(200 虚拟用户负载测试)和成本(实际罚款收取准确率)。在 Edexcel 考试中,始终将设计联系回情境:论证为何选择关系数据库而非平面文件,界面如何支持低龄用户,以及你在安全与便利之间做了何种权衡。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导