Programming basics
INTRODUCTION
In its simplest form a computer program can be seen as a list
of instructions that a computer has to work through in a logical
sequence in order to carry out a specific task. The instructions that
make up a program are all stored in memory on the computer along
...
Computer
Science
Includes AS and A-level
Bob Reeves
Approval message from AQA
This textbook has been approved by AQA for use with our qualification. This means that we
have checked that it broadly covers the specification and we are satisfied with the overall
quality. Full details of our approval process can be found on our website.
We approve textbooks because we know how important it is for teachers and students to
have the right resources to support their teaching and learning. However, the publisher is
ultimately responsible for the editorial control and quality of this book.
Please note that when teaching the AQA A-level Computer Science course, you must
refer to AQA’s specification as your definitive source of information. While this book has
been written to match the specification, it cannot provide complete coverage of every
aspect of the course.
A wide range of other useful resources can be found on the relevant subject pages of our
website: www.aqa.org.uk
, Contents
Introduction v
Section One Fundamentals of programming
1 Programming basics 2
2 Programming concepts 8
3 Basic operations in programming languages 14
4 Subroutines, local and global variables 22
5 Structured programming 28
6 Object-oriented programming concepts 35
Practice questions 46
Section Two Fundamentals of data structures
7 Data Structures and abstract data types 50
8 Queues and stacks 57
9 Graphs and trees 67
10 Hash tables and dictionaries 77
11 Vectors 84
Practice questions 90
Section Three Fundamentals of algorithms
12 Graph and tree traversal 92
13 Dijkstra’s shortest path algorithm 101
14 Search algorithms - binary, binary tree and
linear search 110
15 Reverse Polish Notation 117
16 Sorting algorithms – bubble and merge 124
Practice questions 132
Section Four Fundamentals of computational thinking
17 Abstraction and automation 134
18 Finite state machines 145
19 The Turing machine 150
20 Regular and context-free languages 156
21 Maths for regular expressions 164
22 Big O notation and classification of algorithms 169 iii
Practice questions 179
Section Five Fundamentals of data representation
23 Number systems 182
24 Number bases 187
25 The binary number system 194
26 Coding systems 207
27 Encryption 220
Practice questions 228
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying this summary from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller TUTORSON. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy this summary for R240,94. You're not tied to anything after your purchase.