You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
This lesson covers abstraction, a key component of computational thinking as required by OCR J277 Section 2.1. Abstraction is about focusing on what is essential and ignoring what is not relevant to solving the problem.
Abstraction is the process of removing unnecessary details from a problem to focus on the information that is relevant to solving it. It involves identifying what is important and filtering out what is not.
Abstraction simplifies complex real-world situations into models that can be understood and processed more easily — by both humans and computers.
We use abstraction all the time without realising it:
| Example | What Is Included (Relevant) | What Is Removed (Irrelevant) |
|---|---|---|
| London Tube map | Station names, connections between lines, line colours | Actual geographic distances, street layouts, surface features |
| Road map | Roads, junctions, place names, road numbers | Individual buildings, trees, street furniture |
| Weather forecast | Temperature, rainfall, wind speed, location | Air pressure at every altitude, humidity at every point |
| Contact list on phone | Name, phone number, email | Person's height, eye colour, shoe size |
| Chess | Piece positions, legal moves, board layout | Material the pieces are made from, colour of the board's wood |
OCR Exam Tip: The London Tube map is the classic example of abstraction used in exams. It shows connections and stations but removes geographic accuracy. This makes it easy to plan a journey without being overwhelmed by unnecessary geographic detail.
In computing, abstraction is used at every level:
When designing a system, you must decide what data is relevant and what is not.
Example: Student record system
| Relevant Data (Included) | Irrelevant Data (Excluded) |
|---|---|
| Student name | Hair colour |
| Date of birth | Favourite food |
| Student ID | Height |
| Attendance record | Pet's name |
| Exam results | Shoe size |
| Contact details | Hobbies |
When using a function or procedure, you only need to know what it does and what inputs/outputs it has — you do not need to know how it works internally.
Example: When you call print("Hello") in Python, you do not need to know how the print function communicates with the screen hardware. You just need to know that it displays text.
Operating systems provide an abstraction layer between software and hardware. Programs do not need to know the specific details of the printer, graphics card, or hard drive — the operating system handles these details.
| Reason | Explanation |
|---|---|
| Simplifies problems | Focusing on relevant information makes problems easier to understand |
| Reduces complexity | Complex real-world situations become manageable models |
| Enables generalisation | Abstract solutions can be applied to similar problems |
| Improves efficiency | Programs only process the data they need, not everything |
| Facilitates design | Abstract models (like structure diagrams) help plan solutions before coding |
These two concepts are closely related but different:
| Feature | Decomposition | Abstraction |
|---|---|---|
| What it does | Breaks a problem into smaller parts | Removes unnecessary detail |
| Focus | Structure and organisation | Simplification and relevance |
| Result | A list of sub-problems | A simplified model of the problem |
| Analogy | Splitting a task into steps | Drawing a simplified map |
In practice, you often use both together:
Abstraction can operate at different levels. Each level hides the complexity of the level below it:
| Level | What You See | What Is Hidden |
|---|---|---|
| User | A button that says "Send Email" | All the code behind the button |
| Application | Function calls and data structures | How the operating system manages memory |
| Operating system | File management and process scheduling | How data is physically stored on the disk |
| Hardware | Processors, memory, storage devices | The physics of electrons moving through circuits |
Each level provides a simpler view for the level above, while handling the complexity itself.
When solving a problem in the exam, abstraction means asking:
A navigation app needs to find the shortest route between two locations.
Relevant (included in the model):
Irrelevant (removed by abstraction):
OCR Exam Tip: In the exam, you may be given a scenario and asked to identify what information is relevant and what should be abstracted away. List the relevant data clearly and explain why the excluded data is not needed for solving the specific problem.
Abstraction is the process of removing unnecessary detail to focus on what is essential for solving a problem. It simplifies complex situations into manageable models. In computing, abstraction is used in data design, programming (functions), and hardware (operating systems). For the OCR J277 exam, be ready to identify what information is relevant and what can be removed for a given problem, and explain why abstraction makes problem-solving more effective.
Scenario: A secondary school wants a cashless catering system. Students have accounts, tap a card or thumbprint at the till, and their account is debited for each purchase. Parents can top up the account online. Use abstraction to decide what information the system needs and what should be left out.
Step 1 — List everything a student has and does. Before abstracting, it helps to dump in all the detail you can think of. A student has a name, date of birth, address, emergency contact, tutor group, hair colour, allergies, shoe size, form-group photo, dietary preferences, attendance percentage, timetable, current balance, transaction history, fingerprint template, ID card number, free-school-meals entitlement, favourite sport, and so on.
Step 2 — Decide what the catering system specifically needs. Ask the abstraction question: what data does this system actually use to do its job?
| Relevant data (keep) | Why it is needed |
|---|---|
| Student ID / card number | To identify the student at the till |
| Fingerprint template | Alternative identification if card is forgotten |
| Current balance | To check whether the purchase can be paid for |
| Free-school-meals entitlement | To decide whether to debit the balance or apply the FSM allowance |
| Allergies / dietary requirements | To display warnings to catering staff |
| Transaction history | For parents to review and for dispute resolution |
| Irrelevant data (remove) | Why it is not needed |
|---|---|
| Hair colour, shoe size | Not used by any part of the catering workflow |
| Tutor group, timetable | The till does not need to know the student's lessons |
| Attendance percentage | Relevant to the pastoral system, not to catering |
| Favourite sport | Not a business requirement |
| Form-group photo | Could be included as a nice-to-have but is not essential |
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.