Abstraction, arrays, bubble sort and built-in functions
Watch the whole lecture free
Make a free account to watch every lecture to the end: 5 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
That was the teaching part. The rest of this lecture is free with an account: 5 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
No password needed now: we email you a link to set one. Already have an account? Sign in, then come back to this page.
The teaching part (1 min) is free to watch. A free account opens the whole lecture: 5 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
What this lecture covers
- Keep only what matters
- Abstraction
- Car hire: data and operations
Read the transcript of the teaching part
Last time
Before we start: last time, in SQL, you learned these points. Here they are again on one card. Keep them in mind, because today builds on them.
Keep only what matters
A car hire shop does not need the colour of the customer's eyes. Abstraction means keeping the details a system needs and leaving out the rest. Once you know what to store, arrays hold many values under one name, and sorting puts them in order. Built-in functions then save you writing the same small routines again and again.
Abstraction
Abstraction is the process of removing unnecessary detail and keeping only the essential features needed to solve a problem. It produces a model: a simplified version of the real situation, holding just the data and operations required. In a car hire system, store the customer, the car and the hire dates. Do not store the car's paint colour unless it is needed.
Car hire: data and operations
Data stored each time a car is hired: customer ID, car registration, start date, number of days, and the daily rate or total cost. Operations on the data: calculate the cost, search for cars available on a date, and update the record when the car is returned. Data that is needed but not stored for each hire, such as the customer's address, is stored once elsewhere.
How often it comes up
How often Cambridge has asked each part, counted by ExamYard from every past paper in its question bank: Abstraction: the data a system needs · Array terms and declarations.
The whole chapter: Programming Fundamentals.
Chapter 9: Algorithm design and problem-solving
- Abstraction, arrays, bubble sort and built-in functions 6 min
- Program flowcharts, trace tables and dry runs 5 min
Also for A Level Computer Science 9618
Which topics come up most in A Level Computer Science 9618 past papers, counted from every paper since 2004: Paper 1 topic frequency, Paper 2 topic frequency.