Comp Sci Paper 2

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/24

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:42 PM on 5/16/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

25 Terms

1
New cards

What is abstraction?

Removing unnecessary detail

Simplifying a complex problem

Focussing on only the necessary/main parts

2
New cards

What is representational abstraction?

A representation arrived at by removing unnecessary details from the real-world entity, leaving only the features relevant to the problem being solved.]

Simplified model of something real

Example: tube map

3
New cards

What is abstraction by generalisation?

Grouping together similarities within a problem to identify what kind of problem it is.

Example: Vehicles include cars, lorries, motorbikes, etc.

4
New cards

What is data abstraction?

Details about how data is being stored are hidden

Example: using a stack without knowing how it is implemented

5
New cards

What is procedural abstraction?

Performing functions without having any knowledge about the code used to implement the function.

Example: using print() without knowing the underlying code

6
New cards

What is the need for abstraction?

Allows non experts to make use of a range of systems / models by hiding information that is too complex / irrelevant for the system’s purpose.

7
New cards

What are the advantages of abstraction?

Enables for more efficient / less complex design

Reduces time needed on projects

Prevents programs from getting unnecessarily large

8
New cards

What is a precondition?

Requirements that must be met before a program can be executed

9
New cards

What are the advantages of using reusable program components?

More reliable then newly coded components - already been tested > saves time + cheaper + saves resources

Can be reused in future projects > saves development costs

10
New cards

What is meant by thinking procedurally?

Breaking a problem down into smaller parts which are easier to understand and therefore easier to design

11
New cards

What is problem decomposition?

A large, complex problem is continually broken down into smaller subproblems which can be solved more easily

Becomes more feasible to manage

12
New cards

What is the programming construct ‘sequence’?

Code is executed line by line, from top to bottom

13
New cards

What is the programming construct ‘selection’?

A certain block of code is met if a specific condition is met

Uses IF statements

14
New cards

What is the programming construct ‘iteration’?

A block of code is executed a certain number of times OR until a condition is met

Uses FOR, WHILE, REPEAT UNTIL loops

15
New cards

What are the 2 types of iteration?

Count controlled: Iterates a number of times (FOR)

Condition controlled: Iterates until a condition is met (WHILE)

16
New cards

What is a local variable?

A variable which has a limited scope which means that they can only be accessed within the block of code in which they were defined (normally a single function or procedure)

17
New cards

What is a global variable?

A variable which can be accessed across the whole program

18
New cards

Why is using local variables considered good practice?

It ensures subroutines are self-contained, with no danger of variables being affected by code outside of the subroutine

Local variables also take up less memory compared to global variables

19
New cards

What is meant by modular programming?

A programming technique used to split large, complex problems into smaller, self contained modules

20
New cards

What is the top down approach to modularise problems?

Continually breaking down a problem into sub programs, until each can be represented as an individual, self contained black box which performs a certain task.

Also known as stepwise refinement

21
New cards

What is similar about procedures and functions?

They are both named blocks of code that perform a specific task

22
New cards

How do functions and procedures differ?

Procedures do not have to return a value, however if they do they can return multiple values

Functions must always return a value, and they can only return one singular value

23
New cards

What are the 2 different ways a parameter can be passed into a subroutine?

By value

By reference

24
New cards

What does parameter passing by value mean?

A copy of the value is passed into the subroutine and discarded at the end > its value outside the subroutine will not be affected

procedure abc(x:byVal)

25
New cards

What does parameter passing by reference mean?

The address of the parameter is given to the subroutine, so the value of the parameter will be updated at the given address

procedure abc(x:byRef)