Zum Inhalt springen

English:Computing - Unit 1 - Computing Year 7

Aus MOOCsWiki Staging
aiMOOC-Siegel aiMOOC

Computing - Unit 1 - Computing Year 7

QR-Code



Introduction

Data abstraction levels.png
Data abstraction levels.png

Welcome to your first module in Year 7 Computing! Have you ever wondered how a massive, complex system like a smartphone, a video game, or a global banking network actually works? It is impossible for a single human to keep track of every single moving part at once. That is where 'Abstraction' comes in. In this course, you will learn how computer scientists simplify the real world into manageable models. We will explore how to identify essential features, represent system 'states' and 'behaviours', design visual and textual models like flowcharts and pseudocode, and finally, learn how to critically evaluate whether these models actually do the job they were designed for.


Understanding Abstraction

In the world of computing, abstraction is one of the most fundamental concepts. It is the process of simplifying complex systems by focusing on the essential features that matter for a specific task while ignoring the irrelevant details. Imagine trying to describe a car to someone who has never seen one. You might describe the engine's combustion cycle, the precise chemistry of the fuel injection, and the gear ratios of the transmission. While scientifically accurate, this is far too much information if your goal is simply to explain how to drive the car. Instead, you use an abstraction: you describe the steering wheel, the pedals, and the dashboard. These are the essential features a driver needs to interact with the car.

Computers work the same way. Software engineers use abstraction to manage the overwhelming complexity of modern technology. For instance, when you use an app to send a message, you do not see the millions of lines of code, the complex network protocols, or the way electricity moves through the server hardware. You only see a simple interface: a text box and a send button. This is a computational abstraction. It hides the complicated "how" and lets the user focus on the "what."

Abstraction allows us to build bigger systems because it lets us work on one piece at a time without needing to understand every other piece perfectly. In programming, this often involves creating models. By creating a simplified model of a real-world problem, such as a school timetable or a traffic light system, we can test how a system behaves before we ever write a single line of final code. Understanding abstraction means learning how to strip away the noise to find the core logic of a system.


A worked example, step by step

Scenario: Modeling a Vending Machine.

Task: Create a computational abstraction of a vending machine for a simple snack dispenser.

Step 1: Identify the real-world system. A physical vending machine has buttons, a cooling unit, a motor to turn the coil, a coin slot, and various types of snacks.

Step 2: Identify the essential features (The Abstraction). To model the behavior of the machine for a software program, we only need to know:

  1. The current amount of money inserted (State).
  2. The price of the snack (Data).
  3. The action of 'inserting money' (Input).
  4. The action of 'dispensing the snack' (Output).

Step 3: Ignore irrelevant details. We do not need to model the electricity used by the cooling unit, the specific brand of the snack, or the physical shape of the buttons. These do not affect the logic of 'money in $\rightarrow$ snack out.'

Step 4: Define the model. Model: If (Money $\ge$ Price) then Dispense Snack else Keep Money.

Result: We now have a simplified model that can be turned into a program, regardless of whether the real machine is made of plastic, metal, or wood.

Try it yourself

Scenario: Modeling a Library Book System.

Your task is to create a computational abstraction for a digital library system. You need to represent how a student borrows a book.

Instructions:

  1. Identify the core 'state' (what information needs to be stored?).
  2. Identify the core 'actions' (what can happen to that information?).
  3. List three details that are irrelevant to the basic logic of borrowing a book and should be ignored in your abstraction.

Solution and explanation:

  1. Core State:
  2. Book Title
  3. Availability Status (Available or Borrowed)
  4. Student ID
  1. Core Actions:
  2. Check out book (Changes status to Borrowed and links to Student ID).
  3. Return book (Changes status to Available).
  4. Search for book (Checks if title exists).
  1. Irrelevant Details (to be ignored):
  2. The physical weight of the book.
  3. The color of the book cover.
  4. The temperature of the library room.


Modeling State and Behavior

In computing, when we want to understand or simulate how something works, we often use models. To build an effective model, you need to understand two fundamental concepts: State and Behaviour.

Think of the 'State' as a snapshot of a system at a specific moment in time. It describes what is happening right now. For example, if you are modeling a digital자 character in a video game, the state might include its current health points, its position on the map, and whether it is currently running or standing still. If you were modeling a vending machine, the state would include the amount of money currently inside, the items remaining in the stock, and whether the 'dispense' button is active.

'Behaviour' describes the rules that govern how the state changes over time. It is the 'logic' of the system. Behaviour is often triggered by an event or an input. For instance, in our vending machine model, a specific behaviour rule might be: 'If a user presses the purchase button AND the machine has enough money AND the item is in stock, then subtract the price from the total money AND decrease the stock count.'

By separating state from behaviour, programmers can create complex systems that are easier to manage. Instead of trying to describe every single possible movement of a character at once, they define the possible states (standing, walking, jumping) and the rules (behaviour) for how to move between those states. This is a key part of computational abstraction. It allows us to simplify a complex physical system—like a real-world robot—into a set of variables (state) and a set of rules (behaviour) that a computer can process quickly and accurately.


A worked example, step by step

Let's model a simple 'Smart Door Lock' system.

First, we identify the State. At any given time, the lock has two main pieces of information:

  1. Status: [Locked, Unlocked]
  2. Battery Level: (Example: 80%)

Next, we define the Behaviour rules: Rule A: If the 'Unlock' button is pressed AND the correct code is entered, the Status changes from Locked to Unlocked. Rule B: If the 'Lock' button is pressed, the Status changes from Unlocked to Locked. Rule C: Every time a button is pressed, the Battery Level decreases by 1%.

Step-by-Step Simulation: Initial State: Status = Locked, Battery = 80%. Action: User enters correct code and presses 'Unlock'. Process: Rule A triggers. Rule C also triggers. New State: Status = Unlocked, Battery = 79%.

Action: User presses 'Lock'. Process: Rule B triggers. Rule C also triggers. New State: Status = Locked, Battery = 78%.

Try it yourself

You are tasked with creating a simple model for a 'Digital Pet' (like a Tamagotchi).

  1. Identify three variables that represent the 'State' of the pet (e.g., Hunger level, Sleepiness, etc.). Give each a starting value.
  2. Define two 'Behaviour' rules: one that describes what happens when the pet is fed, and one that describes what happens when the pet sleeps.
  3. Show the State change after the pet is fed once.

Solution and explanation:

  1. State Variables:
  2. Hunger: 50 (out of 100)
  3. Sleepiness: 20 (out of 100)
  4. Happiness: 80 (out of 100)
  1. Behaviour Rules:
  2. Rule 1 (Feeding): If the 'Feed' action is performed, Hunger decreases by 10 and Happiness increases by 5.
  3. Rule 2 (Sleeping): If the 'Sleep' action is performed, Sleepiness decreases by 30 and Hunger increases by 5 (because the pet eats in its sleep).
  1. State Change after Feeding:
  2. Initial: Hunger 50, Sleepiness 20, Happiness 80
  3. Action: Feed
  4. New State: Hunger 40, Sleepiness 20, Happiness 85


Designing Computational Models

When we want to understand how a physical system works, such as a toaster, a vending machine, or a simple robot, we need to break down its actions into a logical sequence. In computing, we do this by designing computational models. These models allow us to plan out every step a system must take before we actually write any code or build any hardware. There are two primary ways we represent these sequences: visual models and textual models.

Visual models, such as flowcharts, use standardised symbols to map out the path of a process. For example, a diamond shape usually represents a decision point (like 'Is the bread toasted?'), while a rectangle represents an action (like 'Lower the lever'). Flowcharts are excellent for identifying loops and branches where the system might take different paths based on specific conditions. They help designers see the "flow" of the logic at a glance.

Textual models, on the other hand, use words to describe the logic in a structured way. One very common form of textual modeling is pseudocode. Pseudocode is not a real programming language; instead, it is a way of writing down the steps of an algorithm using a mix of plain English and programming-like structures. For instance, instead of worrying about complex syntax like semicolons or specific memory management, you might write 'IF the button is pressed, THEN turn on the motor.' This allows you to focus on the underlying logic without getting distracted by the technical details of a specific language.

Both models serve the same purpose: they bridge the gap between a real-world problem and a computer program. By designing these models first, you can find mistakes in your logic—such as a step being missing or a loop that never ends—before you spend time implementing them. This process of modeling is a fundamental part of the design cycle in software engineering and systems thinking.

Symbol category class.svg
Symbol category class.svg


A worked example, step by step

Problem: Design a model for an automatic garden sprinkler system that turns on only when the soil is dry and turns off when it starts to rain.

Step 1: Identify the inputs (Soil Moisture, Rain Sensor). Step 2: Identify the actions (Turn on water, Turn off water). Step 3: Create the pseudocode.

Algorithm:

  1. Check soil moisture.
  2. IF soil moisture is below 30% AND rain sensor is NOT active:
  - Turn on sprinkler.
  - Wait 5 minutes.
  1. ELSE IF rain sensor IS active:
  - Turn off sprinkler.
  1. ELSE:
  - Keep sprinkler off.
  1. Repeat from step 1.


Try it yourself

Task: Design a textual model (pseudocode) for a simple password checker. The system should ask the user to enter a password. If the password is 'Blueberry123', it should display 'Access Granted'. If the password is anything else, it should display 'Access Denied'.

Solution and explanation: Pseudocode:

  1. Prompt the user to 'Enter Password'.
  2. Read the input from the user.
  3. IF the input equals 'Blueberry123':
  - Display 'Access Granted'.
  1. ELSE:
  - Display 'Access Denied'.
  1. End program.


Evaluating Computational Models

In computing, abstraction is a powerful tool used to simplify complex systems by focusing only on the information that matters for a specific task. However, because an abstraction is a simplification, it is rarely a perfect representation of reality. When you design a computational model—such as a flowchart to represent a physical process or a data structure to represent a real-world object—you must critically evaluate how well that model actually works. Evaluating a model involves looking at three main factors: effectiveness, accuracy, and limitations.

Effectiveness refers to how well the abstraction helps you solve the problem or complete the task. For example, if you are designing a system to manage a library, a model that tracks book titles and due dates is highly effective. If your model were to track the weight of every book or the color of the library carpet, it would be less effective because those details do not help a librarian manage loans.

Accuracy measures how closely the model matches the actual behavior of the system. A model might be 'mostly' accurate but fail in specific edge cases. For instance, a model of a vending machine might accurately show how a user selects a snack, but it might fail to account for what happens if the machine runs out of change. Identifying these gaps is a key part of evaluation.

Finally, every abstraction has limitations. These are the things the model intentionally ignores. In computer science, we often accept these limitations because they make the system manageable. For instance, a simplified model of a car might only include 'speed' and 'fuel level' as variables. The limitation here is that it ignores tire pressure, engine temperature, and driver fatigue. As long as these details aren't necessary for the specific program you are writing, the abstraction is useful.

When you evaluate a model, you should always ask: Does this model include everything I need to know to solve my problem? Does it exclude unnecessary details? Where does the model break down, and what real-world factors are missing?

"Calendario" (Calendar) art in the year 1585, from- The Aztec Tonalpohualli Calendar WDL6732 (cropped).png
"Calendario" (Calendar) art in the year 1585, from- The Aztec Tonalpohualli Calendar WDL6732 (cropped).png


A worked example, step by step

Scenario: You are designing a computational model to represent a 'School Bus Route' to help a driver plan their day.

Model Choice: A flowchart that shows the sequence of stops, the number of students boarding at each stop, and the total travel time between stops.

Evaluation Process:

  1. Effectiveness: The model is highly effective for the driver's primary goal (knowing where to go and how many students to expect). It focuses on the essential sequence of the route.
  2. Accuracy: The model is accurate for standard days. However, it might be inaccurate on days when a road is closed for construction or if a student is absent.
  3. Limitations: The model ignores traffic lights, weather conditions, and the specific behavior of the students (e.g., if a student takes longer to board).

Conclusion: The model is a successful abstraction for basic route planning. To improve it, you could add a 'status' variable for 'Road Closed' to handle specific inaccuracies, but adding 'weather' might make the model too complex for a simple daily plan.

Try it yourself

Imagine you are creating a computational model to represent a 'Smart Home Light System'. Your model uses three variables: Light_Status (On/Off), Brightness_Level (1-100), and Timer_Duration (minutes).

Task: Evaluate this model based on the following real-world goal: 'Allow a user to control the lights and see how much electricity the house is using.'

Identify one way the model is effective, one specific limitation, and one potential inaccuracy.

Solution and explanation:

  1. Effectiveness: The model is effective because it allows the user to control the primary functions of the light (turning it on/off and setting the brightness).
  2. Limitation: A major limitation is that the model does not include 'Electricity_Usage'. Because this was omitted from the variables, the user cannot see how much power the house is using.
  3. Inaccuracy: The model might be inaccurate if the light has different 'modes' (like a 'dim' mode vs a 'reading' mode) that aren't captured by a simple 1-100 brightness level, or it fails to account for the 'Time of Day' which might affect the light's behavior in a smart home setup.


Interactive Tasks


Quiz: Test Your Knowledge

What is the primary purpose of abstraction in computing? (To simplify complex systems by focusing on essential features.) (!To make a computer run faster with more electricity.) (!To hide all information from the user completely.) (!To create the most complex code possible.)




In a model of a car for a driver, which of these is an example of abstraction? (The steering wheel and pedals.) (!The chemistry of the fuel injection.) (!The exact gear ratios of the transmission.) (!The engine's internal combustion cycle.)




What does 'State' refer to in a computational model? (A snapshot of a system at a specific moment in time.) (!The rules that govern how a system changes.) (!The physical weight of the hardware.) (!The name of the programmer who wrote the code.)




Which of the following best describes 'Behaviour' in a model? (The rules that govern how the state changes over time.) (!The physical shape of the buttons.) (!The color of the screen.) (!The amount of data stored at the start.)




What is pseudocode? (A way of writing down the steps of an algorithm using a mix of plain English and programming-like structures.) (!A real programming language like Python or Java.) (!A visual diagram with diamonds and rectangles.) (!A type of hardware used to store data.)




Why are flowcharts useful for designing models? (They help designers see the flow of logic, including loops and branches.) (!They are the only way to write actual software.) (!They automatically convert into electricity.) (!They hide all the mistakes in the code.)




When evaluating a model, what does 'Accuracy' measure? (How closely the model matches the actual behavior of the system.) (!How many lines of code are in the program.) (!How pretty the model looks on paper.) (!How much the model costs to build.)




What is a 'Limitation' in a computational abstraction? (The things the model intentionally ignores to remain manageable.) (!A mistake the programmer made by accident.) (!The speed at which the computer processes the data.) (!The maximum amount of data a computer can hold.)




What is the first step in modeling a vending machine for a software program? (Identify the real-world system.) (!Write the final code in Python.) (!Ignore the price of the snacks.) (!Pick the color of the plastic buttons.)




A model of a Smart Door Lock shows that every time a button is pressed, the battery level decreases by 1%. What happens to the battery level for every button press in this model? (It decreases by 1%.) (!It increases by 10%.) (!It stays at 100% forever.) (!It turns off immediately.)





Memory Game

State A snapshot of a system at a specific moment in time.
Behaviour The rules that govern how the state changes over time.
Abstraction Simplifying complex systems by focusing on essential features.
Pseudocode A mix of plain English and programming structures to describe logic.
Flowchart A visual model using symbols to map out a process path.





Drag and Drop

Match the correct terms. Explanation
State Current information like hunger level or battery life.
Behaviour Rules like If Fed Then Hunger Decreases.
Visual Model A flowchart using shapes to show a process.
Textual Model A description of steps using words or pseudocode.
Evaluation Checking effectiveness accuracy and limitations.





Crossword Puzzle

Abstraction The process of simplifying a system by focusing on essential features.
Pseudocode A structured way of describing logic using English-like words.
Flowchart A visual model that uses symbols to map out a process path.
Behaviour The rules that govern how a system changes over time.
Accuracy How closely a model matches the actual behavior of a system.
Limitation Something a model intentionally ignores to remain manageable.





LearningApps


Cloze Text

Complete the text.
Abstraction is the process of simplifying complex systems by focusing on the

features that matter for a specific task while ignoring irrelevant details. Software engineers use abstraction to manage the overwhelming

of modern technology. Think of the State as a

of a system at a specific moment in time. Behaviour describes the

that govern how the state changes over time. Flowcharts use standardised symbols to map out the

of a process. Evaluating a model involves looking at three main factors: effectiveness,

and limitations.



Quiz answers explained

  1. Abstraction allows us to manage complexity by ignoring irrelevant details and focusing on what is necessary for a specific task.
  2. A driver needs to know how to steer and brake, not the microscopic details of the engine's chemistry.
  3. State describes what is happening right now, such as the current health of a character or the amount of money in a machine.
  4. Behaviour is the logic of the system, often triggered by inputs or events.
  5. Pseudocode is used to focus on the underlying logic without worrying about strict syntax rules.
  6. Flowcharts use symbols to map out paths, making it easy to identify decision points and repetitive actions.
  7. Accuracy checks if the model behaves like the real-world system, including checking for edge cases.
  8. Limitations are trade-offs; we ignore details that aren't necessary for our specific task to keep the system simple.
  9. You must first understand the physical system before you can decide which parts of it need to be modeled.
  10. This is a behavior rule: every interaction with the buttons triggers a 1% decrease in the battery state.


Open Tasks


Easy

  1. Task 1: Task: Identify Abstractions. Look around your classroom or home. Choose three everyday objects (e.g., a microwave, a bicycle, a remote control). For each object, list 3 essential features a user needs to interact with and 3 details that are irrelevant to the basic operation. Success Criterion: Clear distinction between 'must-know' and 'nice-to-know' details.
  2. Task 2: Task: Model a Toy. Create a simple verbal description of a toy (like a spinning top or a marble run). Define the 'State' (e.g., is it moving or still?) and one 'Behaviour' (e.g., what happens when you push it?). Success Criterion: Logical connection between the input action and the resulting state change.
  3. Task 3: Task: Flowchart Symbols. Draw four basic flowchart symbols (Process, Decision, Start/End, Input/Output) on a piece of paper. Label each one with its specific meaning. Success Criterion: Correct identification of shapes (e.g., diamond for decision).
  4. Task 4: Task: Pseudocode Basics. Write a 3-step pseudocode list for 'Brushing your teeth'. Use plain English but follow a logical sequence (e.g., 1. Get toothbrush, 2. Apply paste, 3. Brush). Success Criterion: Clear, sequential steps that are easy to follow.


Standard

  1. Task 1: Task: Vending Machine Model. Create a computational abstraction for a vending machine that sells only one item. Identify the State (money inserted, item in stock), the Input (button press), and the Output (item dispensed). Write a simple 'If-Then' rule for the behaviour. Success Criterion: Model accurately reflects 'money in $\rightarrow$ item out' logic.
  2. Task 2: Task: Digital Pet State Map. Design a model for a digital pet. Identify 4 variables for 'State' (e.g., Hunger, Energy, Sleepiness, Friendliness) with starting values of 0-100. Write 2 'Behaviour' rules for 'Feeding' and 'Playing'. Success Criterion: Rules must logically impact at least two state variables.
  3. Task 3: Task: Garden Sprinkler Flowchart. Draw a visual flowchart for an automatic sprinkler system. It must include a decision point for 'Is the soil dry?' and a decision point for 'Is it raining?'. Success Criterion: Correct use of diamond shapes for decisions and rectangles for actions.
  4. Task 4: Task: Password Checker Pseudocode. Write a full pseudocode algorithm for a password checker. It must prompt the user, read the input, and use an 'IF-ELSE' structure to grant or deny access based on the password 'Blueberry123'. Success Criterion: Correct logical structure including an 'End' statement.


Advanced

  1. Task 1: Task: Smart Home Evaluation. Create a model for a smart light system (State: On/Off, Brightness; Behaviour: Toggle button). Evaluate this model against the goal: 'Reduce electricity costs'. Identify one limitation and one inaccuracy. Success Criterion: A critical analysis showing that the model lacks a 'Power Usage' variable.
  2. Task 2: Task: Library System Design. Design a model for a library borrowing system. Define the State (Book Title, Status, Student ID), the Actions (Borrow, Return, Search), and write a pseudocode snippet for the 'Borrow' action. Success Criterion: Complete model that covers all three aspects clearly.
  3. Task 3: Task: Complex System Abstraction. Choose a complex real-world system (e.g., a school's lunch service). Create a multi-layered abstraction: identify the core 'Data' (menu items, student IDs), the 'State' (food remaining), and the 'Behaviour' (ordering process). Success Criterion: Ability to strip away all non-essential details like 'kitchen furniture' or 'chef names'.
  4. Task 4: Task: Model Comparison. Create two different models for a 'Traffic Light': one that only changes based on a timer, and one that changes based on a 'Car Detected' sensor. Write a brief paragraph evaluating which is more 'effective' for a busy intersection and why. Success Criterion: Clear reasoning based on the concepts of Effectiveness and Accuracy.



Learning Check

  1. Transfer task 1: Identify the core concept: What is the primary purpose of 'Abstraction' in computer science?
  2. Transfer task 2: State vs. Behaviour: In a video game character model, if the character's 'Current Health' is 50/100, is this a State or a Behaviour? Explain.
  3. Transfer task 3: Model Design: Write a 'Behaviour' rule for a smart thermostat where the State is 'Current Temperature' and the goal is to keep the room at 20 degrees.
  4. Transfer task 4: Evaluation: You are modeling a 'School Bus Route' to help a driver. You include 'Time of Day' but ignore 'Traffic Lights'. Is this model accurate or effective for the driver's primary goal of navigation? Justify your answer.
  5. Transfer task 5: Pseudocode Logic: Write a pseudocode snippet for a system that checks if a user is old enough to enter a cinema (Age 13).


Learning check: suggested solutions

  1. The primary purpose is to simplify complex systems by focusing on essential features that matter for a specific task while ignoring irrelevant details.
  2. This is a State. It is a snapshot of the character's condition at a specific moment in time. Behaviour would be the rule (e.g., 'If health reaches 0, then character dies').
  3. Rule: If 'Current Temperature' is below 20 degrees, THEN turn on the heater. If 'Current Temperature' is above 20 degrees, THEN turn off the heater.
  4. The model is effective because 'Time of Day' helps with planning, but it is inaccurate/limited because ignoring 'Traffic Lights' means the driver cannot see all the hazards of the route. A good model must balance simplicity with necessary accuracy.
  5. 1. Prompt user to enter Age. 2. Read Age. 3. IF Age is greater than or equal to 13, THEN display 'Access Granted'. 4. ELSE, display 'Access Denied'. 5. End program.


Learning evidence

The learner can successfully identify essential features of a system by stripping away irrelevant details (Abstraction). They can represent a system's status using variables (State) and define the logic of change (Behaviour). They can construct both visual (flowcharts) and textual (pseudocode) models to represent sequences of actions. Finally, the learner can critically evaluate a model's effectiveness, accuracy, and limitations against a specific real-world goal.

OER and Wikipedia

Research and media sources

Abstraction (computer science) – Wikipedia (en).

Data abstraction levels.png – No machine-readable author provided. Doug Bell~commonswiki assumed (based on copyright claims)., Public domain.

Symbol category class.svg – PC78, based on work by Julian Herzog, Zscout370, Ed g2s and Erin Silversmith, Public domain.

"Calendario" (Calendar) art in the year 1585, from- The Aztec Tonalpohualli Calendar WDL6732 (cropped).png – Tovar, Juan de, circa 1546-circa 1626, Public domain.

What is Computational Thinking? | PBS KIDS for Parents – PBS KIDS for Parents, Embedded YouTube video; rights remain with the respective creator.


Linked learning areas


aiMOOC Projects



Schulfach+




aiMOOCs



aiMOOC Projekte









MOOCwiki · Deutsch

Nach dem Lernen ist vor dem Lernen

Entdecke direkt den nächsten Lernkurs. Weitere Inhalte erscheinen, wenn Du weiter nach unten scrollst.

Zur MOOCwiki-Hauptseite

Mediathek

Suche verfeinern

Dein Lernplan bestimmt, was oben steht. Alle anderen Inhalte bleiben erreichbar. Seitenaufrufe beeinflussen die Auswahl nicht.

Inhalte werden geladen ...

Mediathek wird aus dem Wiki geladen ...