Year 8 SQA Computing: Case Study Practical Exercises | 八年级SQA计算机:案例分析实战演练

📚 Year 8 SQA Computing: Case Study Practical Exercises | 八年级SQA计算机:案例分析实战演练

Case studies are one of the most effective ways to build real-world computing skills. By working through simulated scenarios, you learn how to apply database design, algorithmic thinking, debugging, digital literacy, cybersecurity principles and data analysis in contexts that mirror actual problems. This article guides you through six practical case studies, each designed to reinforce key SQA Year 8 outcomes while encouraging independent problem-solving.

案例分析是培养真实计算机技能的最有效方式之一。通过模拟场景练习,你可以学会如何将数据库设计、算法思维、调试、数字素养、网络安全原理和数据分析应用于反映实际问题的情境中。本文将通过六个实战案例,帮助你巩固八年级SQA课程的关键知识点,同时培养独立解决问题的能力。

1. Introduction to Case Studies in Computing | 计算机案例分析简介

Computing is not just about learning tools; it is about using them to solve problems. Case studies present a narrative that requires you to think critically, break down a problem, and propose a structured solution. Throughout this article, each case study will start with a scenario, followed by specific tasks and guided exploration. You are encouraged to attempt the tasks yourself before reading the suggested solutions.

计算机学习不仅仅是掌握工具,更是运用工具解决问题。案例分析提供了一个需要你进行批判性思考、分解问题并提出结构化解决方案的叙述场景。在本文中,每个案例都将从场景描述开始,随后提出具体任务和引导性探索。我们鼓励你在阅读建议的解决方案之前,先自己尝试完成任务。


2. Case Study 1: Designing a School Timetable Database | 案例1:设计学校时间表数据库

A secondary school wants to store its weekly timetable digitally. They need to record which teacher takes which subject in which classroom during each period. The system should allow staff to quickly find out, for example, where Mr Smith teaches History on a Tuesday period 3. Your first task is to identify the main entities, their attributes and the relationships between them.

一所中学希望以数字化方式存储每周课程表。他们需要记录哪位教师在哪个时段、哪个教室教授哪门科目。系统应能让教职员工快速查询,例如周二第三节课史密斯先生在哪里教历史。你的首要任务是识别主要实体、它们的属性以及它们之间的关系。

Start by listing the core entities: you should recognise Subject, Teacher, Classroom and Period. For each entity, define sensible attributes. A Subject might have a SubjectID, SubjectName and Department. A Teacher entity could store TeacherID, FirstName and LastName. The Classroom entity needs RoomNumber and Building. A Period entity can hold DayOfWeek and TimeSlot. Make sure each table has a primary key.

首先,列出核心实体:你应该能识别出科目(Subject)、教师(Teacher)、教室(Classroom)和时段(Period)。为每个实体定义合理的属性。科目实体可有SubjectID、SubjectName和Department。教师实体可存储TeacherID、FirstName和LastName。教室实体需要RoomNumber和Building。时段实体可包含DayOfWeek和TimeSlot。确保每个表都有一个主键。

Next, think about relationships. A teacher can teach many subjects, and a subject can be delivered by many teachers – this is a many-to-many relationship that requires a linking table. The simplest solution is to create a TimetableEntry table with foreign keys: TeacherID, SubjectID, RoomID and PeriodID. This design resolves the many-to-many connections and avoids data duplication.

接下来,思考关系。一位教师可以教授多门科目,一门科目也可以由多位教师教授——这是一种多对多关系,需要一个链接表。最简单的解决方案是创建一个TimetableEntry表,其中包含外键:TeacherID、SubjectID、RoomID和PeriodID。这种设计解决了多对多连接,避免了数据重复。

Table Name Key Fields (Primary Key underlined)
Subject SubjectID, SubjectName, Department
Teacher TeacherID, FirstName, LastName, Email
Classroom RoomID, RoomNumber, Building
Period PeriodID, DayOfWeek, TimeSlot
TimetableEntry EntryID, TeacherID (FK), SubjectID (FK), RoomID (FK), PeriodID (FK)

With this structure, generating a query like “find all lessons for a specific teacher on Monday” becomes straightforward. You would join the TimetableEntry and Period tables, filtering by TeacherID and DayOfWeek = ‘Monday’. If your school uses a query language, the logic is simple; even without coding, you can explain the steps logically.

有了这个结构,生成诸如“查找某位教师周一的所有课程”的查询就变得简单了。你可以将TimetableEntry表和Period表进行连接,并通过TeacherID和DayOfWeek = ‘Monday’进行筛选。如果学校使用查询语言,逻辑很简单;即使不编写代码,你也可以用逻辑清晰地解释步骤。


3. Case Study 2: Debugging a Scratch Program | 案例2:调试Scratch程序

A Year 8 student has created a simple maze game in Scratch, but the sprite behaves oddly. When the right arrow key is pressed, the sprite moves left; when the up arrow key is pressed, it sometimes moves down instead. The student also reports that the ‘Game Over’ message appears even when the sprite hasn’t touched the enemy. Your job is to find and fix all three bugs.

一位八年级学生在Scratch中制作了一个简单的迷宫游戏,但角色行为异常。当按下右箭头键时,角色向左移动;按下上箭头键时,角色有时会向下移动。学生还报告说,即使角色没有碰到敌人,“Game Over”消息也会出现。你的任务是找出并修复这三个错误。

Open the project and examine the script attached to the sprite. For movement, the student used four event blocks: when [left arrow v] key pressed, when [right arrow v] key pressed, and so on. Look inside: the left arrow script contains ‘change x by 10’ instead of ‘change x by -10’. This reverses horizontal direction. Similarly, the up arrow script accidentally uses ‘change y by -10’. That explains the movement faults. Always verify direction values: positive x is right, positive y is up.

打开项目,检查附加在角色上的脚本。对于移动,学生使用了四个事件积木:when [left arrow v] key pressed、when [right arrow v] key pressed等。查看内部:左箭头脚本中包含了“change x by 10”而不是“change x by -10”,这颠倒了水平方向。同样,上箭头脚本错误地使用了“change y by -10”。这就解释了移动错误。务必核实方向值:正x为右,正y为上。

The third bug relates to the collision detection. The student placed the ‘if touching Enemy then broadcast GameOver’ block inside a forever loop but forgot to add a condition that the game is still running. Because of the placement, the check happens even before the game officially starts, instantly triggering the game-over sequence. Solve this by introducing a variable gameActive and only checking collision when gameActive = 1.

第三个错误与碰撞检测有关。学生将“if touching Enemy then broadcast GameOver”积木放在了一个forever循环中,但忘记添加游戏仍在运行的条件。由于放置不当,检测甚至在游戏正式开始前就发生了,立即触发了游戏结束序列。解决方法是引入一个变量gameActive,并且仅当gameActive = 1时才进行碰撞检测。

After fixing these errors, test the game thoroughly. Walk through all arrow keys and intentionally collide with the enemy to ensure everything works. This case highlights the importance of systematic debugging: start with what you expect to happen, check the actual behaviour, and zero in on the line or block causing the difference.

修复这些错误后,全面测试游戏。遍历所有箭头键,并故意与敌人碰撞以确保一切正常。这个案例突显了系统化调试的重要性:从你期望发生的情况开始,检查实际行为,然后定位导致差异的代码行或积木。


4. Case Study 3: Evaluating Online Sources | 案例3:评估网络资源

Your class has been asked to research the effects of screen time on sleep. You find two websites: one is from a university’s sleep research centre, with named authors and a recent publication date; the other is from a personal blog with no author listed, filled with advertisements, and claiming ‘screen light causes instant blindness’. Use the CRAAP test (Currency, Relevance, Authority, Accuracy, Purpose) to decide which source is trustworthy.

你的班级被要求研究屏幕使用时间对睡眠的影响。你找到了两个网站:一个来自某大学睡眠研究中心,有明确的作者和最近的发布日期;另一个来自未列出作者的个人博客,满是广告,并且声称“屏幕光线导致立即失明”。使用CRAAP测试(时效性、相关性、权威性、准确性、目的性)来判断哪个来源值得信赖。

Apply each CRAAP dimension. Currency: the university article is dated 2024; the blog post has no date. Relevance: both discuss screen time, but the blog makes extreme claims that are not backed by evidence. Authority: the research centre gives credentials; the blog is anonymous. Accuracy: the university site cites peer-reviewed studies; the blog offers no sources. Purpose: the university site aims to inform; the blog seems designed to drive clicks and sell products. The conclusion is clear.

应用每个CRAAP维度。时效性:大学文章日期为2024年;博客帖子没有日期。相关性:两者都讨论屏幕时间,但博客提出没有证据支持的极端主张。权威性:研究中心提供了资质证明;博客是匿名的。准确性:大学网站引用了经过同行评审的研究;博客没有提供任何来源。目的性:大学网站旨在传播信息;博客似乎是为了增加点击量和销售产品。结论显而易见。

When you write your research notes, summarise why the university source is reliable and explain why you rejected the blog. Being able to evaluate digital information is a crucial skill, especially as misinformation spreads easily online. Always ask: who wrote this, when, and why? Check multiple reliable sources to cross-reference facts.

在撰写研究笔记时,总结为什么大学来源是可靠的,并解释你为何拒绝那个博客。能够评估数字信息是一项至关重要的技能,尤其是在错误信息易于在网络上传播的情况下。始终问自己:谁写的?什么时候写的?为什么写的?查阅多个可靠来源以交叉比对事实。


5. Case Study 4: Creating a Flowchart for a Vending Machine | 案例4:为自动售货机绘制流程图

A vending machine sells drinks for 50p. It accepts 10p, 20p and 50p coins. The customer inserts coins, selects a drink, and the machine checks if enough money has been inserted and whether the selected drink is in stock. If yes, it dispenses the drink and returns any change. If not, it displays a message and waits for more coins or a different selection. Your task is to draw a flowchart that represents this logic.

一台自动售货机以50便士出售饮料。它接受10便士、20便士和50便士硬币。顾客投入硬币,选择饮料,机器检查是否已投入足够金额以及所选饮料是否有库存。如果满足条件,它将发放饮料并退回零钱。否则,显示消息并等待更多硬币或选择其他饮料。你的任务是绘制一个代表此逻辑的流程图。

Begin with the start symbol (oval). The first action is ‘Insert coins’ (parallelogram). Then the machine calculates the total value. A decision diamond asks: ‘Is total >= 50p?’ If no, it loops back to wait for more coins. If yes, proceed to ‘Select drink’ (parallelogram). Another decision: ‘Is selected drink in stock?’ If no, display ‘Out of stock’ and return to selection. If yes, ‘Dispense drink’ (rectangle). Then another decision: ‘Is total > 50p?’ If yes, ‘Calculate change’ and ‘Return change’ (both rectangles). Finally, end (oval).

从开始符号(椭圆形)开始。第一个动作是“投入硬币”(平行四边形)。然后机器计算总金额。一个决策菱形问:“总金额 ≥ 50便士?”如果否,则循环回到等待更多硬币。如果是,则进行到“选择饮料”(平行四边形)。另一个决策:“所选饮料有库存吗?”如果否,显示“缺货”并返回选择。如果是,“发放饮料”(矩形)。然后另一个决策:“总金额 > 50便士?”如果是,则“计算零钱”并“退回零钱”(均为矩形)。最后,结束(椭圆形)。

Use standard flowchart symbols and make sure the flow is logical. Walk through the flowchart with example inputs: insert 20p, 20p, 10p (total 50p), select Cola (in stock) – the machine dispenses Cola and finishes. Insert 50p, select Lemonade (out of stock) – machine loops to selection. Flowcharts help you visualise algorithms before coding and are excellent for identifying missing steps or logic errors.

使用标准的流程图符号,并确保流程合乎逻辑。用示例输入走一遍流程图:投入20便士、20便士、10便士(共50便士),选择可乐(有库存)——机器发放可乐并结束。投入50便士,选择柠檬水(缺货)——机器循环到选择。流程图可以在编码前可视化算法,非常适合发现缺失的步骤或逻辑错误。


6. Case Study 5: Cybersecurity Audit for a Small Business | 案例5:小型企业网络安全审计

A local bakery uses a computer to manage orders, customer data and social media. The owner is not very tech-savvy and wants your help to secure the business. You conduct a basic security audit and notice several risks: staff use passwords like ‘bakery123’, the operating system hasn’t been updated in months, there is no backup system, and the business Wi-Fi is open with no password. Your report should identify threats and suggest practical defences.

一家本地面包店使用计算机管理订单、客户数据和社交媒体。店主不太懂技术,希望你能帮助保护业务安全。你进行了一次基本的安全审计,注意到几个风险:员工使用诸如“bakery123”之类的密码、操作系统数月未更新、没有备份系统,而且店里的Wi-Fi没有密码。你的报告应当识别威胁并提出实用的防御措施。

Risk Observed Potential Threat Recommendation
Weak passwords Unauthorised access, brute-force attack Enforce minimum 8-character passwords with letters, numbers and symbols. Use a password manager.
Outdated software Malware exploiting known vulnerabilities Enable automatic updates and install security patches promptly.
No backups Permanent data loss from ransomware or hardware failure Set up daily automated backups to an external drive and cloud storage.
Open Wi-Fi Eavesdropping, unauthorised network access Secure Wi-Fi with WPA3 encryption and a strong password; hide SSID if possible.

Additionally, you recommend activating two-factor authentication for all accounts that support it, especially email and social media. Educate staff about phishing emails: never click suspicious links or download unexpected attachments. Simple awareness can prevent many attacks.

此外,你建议对所有支持双重验证的账户(尤其是电子邮件和社交媒体)启用该功能。教育员工识别钓鱼邮件:切勿点击可疑链接或下载意外附件。简单的意识培训就能防止许多攻击。

Your report concludes with a simple security policy: all devices must be locked when unattended, passwords changed every 90 days, and a designated person responsible for monitoring updates. Even small businesses benefit hugely from these low-cost measures.

你的报告以一份简单的安全政策作为结尾:所有设备在无人看管时必须锁定,密码每90天更换一次,并指定专人负责监控更新。即使是小型企业,也能从这些低成本措施中大大受益。


7. Case Study 6: Data Analysis with Spreadsheets | 案例6:使用电子表格进行数据分析

Your teacher has given you a spreadsheet containing the end-of-term test scores for 20 students. The data has columns for Student Name (column A) and Score out of 50 (column B). You are asked to calculate the mean, median, mode, and create a simple bar chart. Then you must interpret the results: are there any outliers? Is the class performance consistent?

你的老师给了你一张电子表格,里面有20名学生的期末考试成绩。数据包含两列:学生姓名(A列)和分数(满分为50分,B列)。你需要计算平均数、中位数、众数,并创建一个简单的条形图。然后你必须解读结果:是否存在异常值?班级表现是否一致?

Start by entering the formulas. For the mean in cell D2, type =AVERAGE(B2:B21). For the median, use =MEDIAN(B2:B21). For the mode, =MODE.SNGL(B2:B21) (this returns the most frequent score). Suppose the results show mean = 34.2, median = 35, mode = 38. The values are close, suggesting a symmetric distribution. However, scanning the data, one student scored 12, which is much lower than the rest. That outlier pulls the mean down slightly.

首先输入公式。在单元格D2中计算平均数,输入=AVERAGE(B2:B21)。中位数使用=MEDIAN(B2:B21)。众数使用=MODE.SNGL(B2:B21)(返回最常出现的分数)。假设结果显示平均数为34.2,中位数为35,众数为38。这些值很接近,说明分布大致对称。然而,扫描数据发现,一名学生只得了12分,远低于其他同学。这个异常值略微拉低了平均数。

Create a bar chart by selecting the data and inserting a 2-D column chart. Add a title ‘Class Test Scores’ and axis labels. The chart immediately visualises the spread: most scores cluster between 30 and 45, while one bar stands out at 12. This visual evidence supports the numeric finding and makes it easier to discuss with your teacher. Always ask: what does the data tell us about the class’s understanding? Could the low score be due to absence or a special circumstance?

通过选择数据并插入二维柱形图来创建条形图。添加标题“班级考试成绩”和坐标轴标签。图表立即直观地显示了分布:大多数分数集中在30到45之间,而一个柱形突出显示为12。这一可视化证据支持了数值发现,并使与老师的讨论更加容易。始终要问:数据告诉我们关于班级理解程度的什么信息?低分是否由于缺勤或特殊情况?

Finally, use ‘Sort & Filter’ to order scores and identify the top and bottom performers. This case builds fundamental spreadsheet skills and data literacy, preparing you for more advanced statistical analysis in later years.

最后,使用“排序和筛选”功能对分数进行排序,并找出表现最好和最差的学生。这个案例建立了基本的电子表格技能和数据素养,为你今后进行更高级的统计分析做好准备。


8. Reflection and Key Skills | 反思与关键技能

These six case studies have taken you through database design, debugging, source evaluation, algorithmic flowcharts, cybersecurity audit and spreadsheet analysis. In each scenario, you applied a structured approach: understand the problem, break it down, propose a solution, test it and reflect. This is the essence of computational thinking.

这六个案例学习带领你经历了数据库设计、调试、资源评估、算法流程图、网络安全审计和电子表格分析。在每个场景中,你都运用了结构化的方法:理解问题、分解问题、提出解决方案、测试方案并进行反思。这正是计算思维的核心。

You also developed transferable skills: attention to detail when debugging, critical thinking when evaluating online content, and communication when presenting security advice or chart insights. Remember that mistakes are part of the process; each bug fixed and each design refined deepens your understanding. Keep practicing with new scenarios, and always challenge yourself to ask ‘what if’ questions.

你还培养了可迁移技能:调试时对细节的关注、评估在线内容时的批判性思维,以及在提出安全建议或解读图表时的沟通能力。请记住,错误是过程的一部分;每次修复错误、每次改进设计,都会加深你的理解。不断用新的场景练习,并始终用“如果……会怎样”的问题挑战自己。


Published by TutorHao | Computing Revision Series | aleveler.com

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

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading