📚 Case Study Practical Exercise for Pre-U CCEA Computer Science | 案例分析实战演练(CCEA Pre-U 计算机)
A core component of the CCEA Pre-U Computer Science qualification is the ability to apply theoretical knowledge to a substantial real‑world case study. This article walks you through a complete practical exercise centred on designing a Digital Library Management System for a Sixth‑Form College. You will see how to move from initial scenario analysis to final evaluation, covering data modelling, algorithm design, implementation considerations, testing and documentation. Each section models the kind of analytical and design thinking expected in high‑band coursework and examination responses.
CCEA Pre‑U 计算机科学课程中,将理论知识应用于真实的综合案例研究是核心能力要求。本文围绕为一所高中学院设计数字图书馆管理系统这一完整实操演练展开。你将看到如何从最初的场景分析过渡到最终评估,覆盖数据建模、算法设计、实现考量、测试与文档编制。每个小节都模拟了高分课程作业与考试答卷所要求的分析与设计思维。
1. Understanding the Case Study Scenario | 理解案例场景
The case study describes a sixth‑form college library that currently uses a manual paper‑based system to manage book loans, student records and catalogue searches. The college wants a digital system that allows librarians to add and remove books, students to search and reserve items, and that automatically calculates fines for overdue returns. The system must be usable via both desktop workstations in the library and a mobile‑responsive web interface.
案例描述了一所高中学院图书馆目前使用人工纸质系统管理图书借阅、学生记录和目录检索。学院希望开发一个数字系统,允许图书管理员添加和移除图书,学生能够检索和预约项目,并能自动计算逾期罚款。系统必须既能在图书馆内的台式计算机上使用,也能通过移动响应式网页界面访问。
Key stakeholders include the librarian, students, and the college IT support team. The system must handle up to 50,000 book records and support 1,200 active borrowers. Performance, data integrity and ease of use are critical non‑functional requirements.
关键干系人包括图书管理员、学生和学院 IT 支持团队。系统需要处理多达 50 000 条图书记录,支持 1 200 名活跃借阅者。性能、数据完整性和易用性是关键的非功能需求。
2. Requirements Elicitation and Analysis | 需求获取与分析
Functional requirements are derived from interviews with the librarian and student representatives. The librarian must be able to catalogue new acquisitions, update book status (available, on loan, reserved, lost), view current loans per student, and generate overdue reports. Students require a search function by title, author or ISBN, the ability to reserve up to three books, and a dashboard showing their loan history and outstanding fines.
功能性需求通过与图书管理员和学生代表的访谈得出。图书管理员需要能够编目新入库图书,更新图书状态(可借、已借出、预约中、丢失),查看每位学生的当前借阅情况,并生成逾期报告。学生需要按书名、作者或 ISBN 进行检索,能够最多预约三本书,并拥有一个显示借阅历史与未缴罚款的仪表板。
Non‑functional requirements include sub‑second search response time for up to 50,000 records, 99.9% uptime during term time, role‑based access control, and compliance with GDPR for handling student data. A use case diagram can summarise the main actor‑system interactions.
非功能需求包括:对多达 50 000 条记录实现亚秒级检索响应时间,学期期间达到 99.9% 的正常运行时间,基于角色的访问控制,并符合 GDPR 对学生数据的处理要求。用例图可以概括主要的参与者与系统交互。
3. Data Modelling with Entity-Relationship Diagrams | 使用实体关系图进行数据建模
The system’s data requirements are modelled using an Entity‑Relationship diagram. Key entities are Student, Book, Loan, Reservation and Fine. Each Book is uniquely identified by ISBN and has attributes such as title, author, publication year and status. Student holds a unique college ID, name, email and year group.
系统的数据需求使用实体‑关系图建模。关键实体包括学生、图书、借阅、预约和罚款。每本图书由 ISBN 唯一标识,并具有书名、作者、出版年份和状态等属性。学生实体包含唯一的学院 ID、姓名、邮箱和年级。
A Loan entity links a Student and a Book, recording loan date, due date and return date. A Reservation entity captures the date a student reserves a book and its position in the waiting queue. Fines are calculated when the return date exceeds the due date, with a daily rate of 0.20 GBP. Relationships include ‘borrows’ (Student to Loan), ‘applies to’ (Loan to Book), and ‘incurs’ (Loan to Fine).
借阅实体关联学生与图书,记录借阅日期、应还日期和归还日期。预约实体记录学生预约图书的日期及其在等待队列中的位置。罚款在归还日期超过应还日期时计算,每日费率为 0.20 英镑。关系包括“借阅”(学生到借阅)、“应用于”(借阅到图书)和“产生”(借阅到罚款)。
4. Normalisation of Database Tables | 数据库表的规范化
An unnormalised loan record might contain repeating groups such as multiple books per student. By applying first normal form (1NF), we ensure every column holds atomic values and there are no repeating groups. The second normal form (2NF) removes partial dependencies by separating book details into a Book table, using ISBN as the primary key, and ensuring Loan depends on the whole composite key (StudentID, ISBN, LoanDate).
未规范化的借阅记录可能包含重复组,例如每位学生拥有多本书。通过应用第一范式(1NF),确保每个列保存原子值且没有重复组。第二范式(2NF)通过将图书详细信息拆分到图书表(以 ISBN 为主键)来消除部分依赖,并确保借阅依赖于整个复合键(StudentID, ISBN, LoanDate)。
The third normal form (3NF) removes transitive dependencies. For instance, a Fine table is linked to Loan via a LoanID, rather than storing student details alongside the fine. The final schema includes Student(StudentID, Name, Email, YearGroup), Book(ISBN, Title, Author, Year, Status), Loan(LoanID, StudentID, ISBN, LoanDate, DueDate, ReturnDate), Reservation(ReservationID, StudentID, ISBN, ReservationDate, QueuePosition) and Fine(FineID, LoanID, Amount, PaidStatus).
第三范式(3NF)消除传递依赖。例如,罚款表通过 LoanID 与借阅关联,而不是将学生详细信息与罚款存储在一起。最终的模式包括:Student(StudentID, Name, Email, YearGroup), Book(ISBN, Title, Author, Year, Status), Loan(LoanID, StudentID, ISBN, LoanDate, DueDate, ReturnDate), Reservation(ReservationID, StudentID, ISBN, ReservationDate, QueuePosition) 和 Fine(FineID, LoanID, Amount, PaidStatus)。
5. Designing Algorithms and Pseudocode | 算法与伪代码设计
Two critical algorithms are the book search and the overdue fine calculation. The search algorithm should efficiently locate books by partial title match. A possible approach is to use a sorted index on title and perform a binary search, or use a hash‑based lookup using an inverted index for real‑time substring matching.
两个关键算法是图书检索和逾期罚款计算。检索算法应能高效地按部分书名匹配定位图书。一种可能的方法是对书名建立排序索引并进行二分查找,或者使用基于哈希的倒排索引实现实时的子串匹配。
Pseudocode for overdue fine calculation takes the due date, return date and daily rate as inputs. It first checks if the return date is later than the due date; if so, it calculates the number of overdue days, multiplies by the rate and returns the amount. Otherwise it returns zero. Edge cases include handling weekends and holidays if required by college policy.
逾期罚款计算的伪代码将应还日期、归还日期和每日费率作为输入。首先检查归还日期是否晚于应还日期;如果是,则计算逾期天数,乘以费率并返回金额。否则返回零。边缘案例包括在学院政策要求时处理周末和假期。
PSEUDOCODE: CalculateFine(dueDate, returnDate, dailyRate)
IF returnDate > dueDate THEN
overdueDays ← DAYS_BETWEEN(dueDate, returnDate)
RETURN overdueDays × dailyRate
ELSE
RETURN 0
END IF
6. Implementing Core Functionalities in Python | 使用 Python 实现核心功能
Although the full system would use a relational database and a web framework, core logic can be prototyped in Python. For the search function, we can load book data into a list of dictionaries and filter using list comprehensions. A simple example for searching by author uses a linear scan; in production an indexed structure like a suffix tree could be used for sub‑string search on large datasets.
尽管完整的系统将使用关系数据库和 Web 框架,但核心逻辑可以用 Python 进行原型开发。对于检索功能,可以将图书数据加载到字典列表中,并使用列表推导式进行筛选。一个简单的按作者检索的例子使用线性扫描;在生产环境中,对于大数据集的子串搜索可以使用后缀树等索引结构。
The fine calculation function can be implemented using Python’s datetime module. It parses date strings, finds the difference and applies the daily rate. Unit tests must confirm correct handling of exact due date returns, one‑day overdue and multi‑day overdue periods. Code fragments are shared below to illustrate the style expected in coursework.
罚款计算函数可以使用 Python 的 datetime 模块实现。它解析日期字符串,计算日期差并应用每日费率。单元测试必须确认正确处理准时归还、逾期一天和逾期多天的情况。下方分享的代码片段展示了课程作业中期望的风格。
def calculate_fine(due_date, return_date, daily_rate=0.20):
from datetime import datetime
due = datetime.strptime(due_date, ‘%Y-%m-%d’)
returned = datetime.strptime(return_date, ‘%Y-%m-%d’)
delta = (returned – due).days
return max(0, delta) * daily_rate
7. User Interface Design Principles | 用户界面设计原则
The user interface is designed with consistency, feedback and minimal cognitive load. For librarians, a dashboard shows quick actions: ‘Scan ISBN’, ‘View Loans’, ‘Reports’. A search bar at the top remains visible on all pages. For students, the mobile interface uses large touch targets, a simple navigation bar, and colour‑coded status indicators (green for available, orange for on loan, red for overdue).
用户界面设计遵循一致性、反馈和最小化认知负担的原则。面向图书管理员的仪表板显示快速操作:“扫描 ISBN”、“查看借阅”、“报告”。顶部的搜索栏在所有页面保持可见。对于学生,移动端界面使用较大的触摸目标、简洁的导航栏和颜色编码的状态指示(绿色表示可借,橙色表示已借出,红色表示逾期)。
Wireframes can be produced using tools like Balsamiq. The design adheres to the college’s branding guidelines and accessibility standards, ensuring sufficient contrast and screen‑reader compatibility. Form validation messages appear inline and clearly describe how to correct input errors, reducing user frustration.
可以使用 Balsamiq 等工具制作线框图。设计遵循学院的品牌指南和无障碍标准,确保足够的对比度和屏幕阅读器兼容性。表单验证消息以内联方式出现,并清晰地说明如何纠正输入错误,从而减少用户挫败感。
8. Testing Strategies: Black-box and White-box | 测试策略:黑盒与白盒
A comprehensive test plan covers both black‑box and white‑box testing. Black‑box test cases are derived from the functional requirements. For the search function, test cases include exact title match, partial title with no results, search by author with special characters, and an empty search string. For the loan transaction, valid scenarios like borrowing an available book and edge cases such as borrowing a reserved book by another student are tested.
全面的测试计划涵盖黑盒和白盒测试。黑盒测试用例源自功能需求。对于检索功能,测试用例包括准确书名匹配、无结果的部分书名检索、带特殊字符的作者检索,以及空检索字符串。对于借阅事务,测试有效场景(如借阅可借图书)以及边缘案例(如其他学生预约的图书被尝试借阅)。
White‑box testing examines the internal logic, such as achieving full branch coverage in the fine calculation algorithm. Code that handles date parsing must be tested with invalid date formats to ensure robust error handling. Static testing through walkthroughs and inspections helps identify logic errors early. Test logs and traceability matrices are maintained to demonstrate thoroughness.
白盒测试检查内部逻辑,例如在罚款计算算法中实现完整的分支覆盖。处理日期解析的代码必须使用无效日期格式进行测试,以确保稳健的错误处理。通过走查和审查进行的静态测试有助于尽早发现逻辑错误。维护测试日志和可追溯性矩阵以证明全面性。
9. Evaluation and Maintenance Considerations | 评估与维护考量
Evaluation criteria include how well the system meets the original success criteria, such as response time, user satisfaction measured through a survey, and reduction in librarian administrative time. A comparison with the old manual system shows quantifiable improvements: average book check‑out time drops from 90 seconds to 15 seconds, and overdue fine collection accuracy improves from 78% to 99%.
评估标准包括系统在多大程度上满足原始成功标准,如响应时间、通过调查测量的用户满意度以及图书管理员行政时间的减少。与旧的人工系统进行对比可以显示出可量化的改进:平均借书时间从 90 秒降至 15 秒,逾期罚款收缴准确率从 78% 提升至 99%。
Maintenance considerations are built into the design. The modular structure allows independent updates to the fine calculation policy if the daily rate changes. Database schema can be extended to include e‑book resources without disrupting existing functionality. Regular backups and a version‑controlled codebase support long‑term sustainability.
维护考量已融入设计之中。如果日费率发生变化,模块化结构允许独立更新罚款计算策略。数据库模式可以扩展以包含电子书资源,而不会破坏现有功能。定期备份和版本控制的代码库支持长期可持续性。
10. Documentation and Presentation | 文档与展示
Good documentation includes a project overview, system architecture diagram, data dictionary, installation guide, user manual and a detailed evaluation report. The data dictionary provides precise definitions for every field, including data types, validation rules and example values, which helps future developers understand constraints.
良好的文档包括项目概述、系统架构图、数据字典、安装指南、用户手册和详细的评估报告。数据字典为每个字段提供精确的定义,涵盖数据类型、验证规则和示例值,这有助于未来的开发人员理解约束。
The user manual contains step‑by‑step instructions with screenshots for common tasks: logging in, searching for a book, borrowing and returning, and paying fines. Presentation to stakeholders uses a clear slide deck that highlights the problem, solution, key design decisions, demonstration of the prototype and evaluation results.
用户手册包含常用任务的分步说明及截图:登录、检索图书、借阅与归还、缴纳罚款。向干系人展示时使用清晰的幻灯片,重点突出问题、解决方案、关键设计决策、原型演示和评估结果。
11. Ethical and Legal Implications | 伦理与法律影响
Storing student personal data requires strict adherence to data protection laws such as the UK GDPR and the Data Protection Act 2018. The system implements data minimisation by only collecting necessary information, secures data at rest with encryption, and provides a mechanism for students to request their data be deleted upon leaving the college.
存储学生个人数据要求严格遵守英国 GDPR 和《2018 年数据保护法》等数据保护法规。系统通过仅收集必要信息来实现数据最小化,对静态数据进行加密保护,并提供一种机制,允许学生在离开学院时请求删除其数据。
Ethical considerations include ensuring the fine system does not disproportionately penalise students from disadvantaged backgrounds. The design includes a maximum fine cap and the ability for librarians to waive fines under exceptional circumstances. Algorithmic fairness in search ranking is considered so that no book is unjustly hidden from results.
伦理考量包括确保罚款系统不会对来自弱势背景的学生造成过度惩罚。设计包含最高罚款上限,以及图书管理员在特殊情况下免除罚款的能力。还考虑了搜索排名中的算法公平性,确保没有任何书籍被不公平地隐藏在结果之外。
12. Final Recommendations and Conclusion | 最终建议与结论
Based on the prototyping and evaluation, the digital library management system is feasible and offers significant benefits to the college. The recommended approach is an agile development path with iterative releases: first a core loan and catalogue module, then reservation and fine management, and finally the mobile interface. Stakeholder feedback should be incorporated at each stage to refine requirements.
基于原型开发和评估,数字图书馆管理系统是可行的,并为学院带来显著效益。建议采用敏捷开发路径,分迭代发布:首先开发核心借阅和编目模块,然后是预约和罚款管理,最后是移动界面。每个阶段都应融入干系人反馈以细化需求。
In conclusion, this case study has demonstrated how Pre‑U CCEA Computer Science students can effectively integrate system analysis, design, programming and evaluation. By working through each stage systematically, learners develop a deep understanding of the software development lifecycle and the professional standards required in modern computing projects. Use this framework to approach any case study with confidence.
总之,本案例展示了 Pre‑U CCEA 计算机科学学生如何有效地整合系统分析、设计、编程和评估。通过系统地经历每个阶段,学习者能深入理解软件开发生命周期以及现代计算项目所需的专业标准。运用此框架可以自信地应对任何案例研究。
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课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply