computer science alevel aqa

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

1/338

encourage image

There's no tags or description

Looks like no tags are added yet.

339 Terms

1
New cards

data type

defined by the values it can take and which operations can be performed on it

2
New cards

Integer

A whole number, positive or negative, including zero

3
New cards

Real / Float

A positive or negative number which can have a fractional part

4
New cards

Boolean

a value which is either true or false

5
New cards

Character

A single number, letter or symbol

6
New cards

string

A collection of charcaters

7
New cards

Data/ time

A way of storing a point in time

8
New cards

Pointer

A way of storing memory addresses

9
New cards

Records

A collection of fields each can have thier own data type

10
New cards

Arrays

A finite indexed set of related elements each of which has the same data type

11
New cards

User-defined data types

  • made from existing data types
12
New cards

-Ensures that a solution is as memory efficient as possible

13
New cards

Variable declaration

Creating a variable for the first time, giving it a name and sometimes a data type

14
New cards

Constant declaration

The same as variable declaration, but when creating a constant

15
New cards

Assignment

Giving a constant or variable a value.

16
New cards

Iteration

Repeating an instruction.

17
New cards

Selection

Comparing values and choosing an action based on those values.

18
New cards

Subroutine

A named block of code containing a set of instructions designed to perform a frequently used operation

19
New cards

Definite iteration

The number of repetitions required is known before the loop starts

20
New cards

Indefinite iteration

The number of repetitions required is not known before the loop starts

21
New cards

Nested structures

Selection structures and iteration structures can be nested

22
New cards

One structure is placed within another

23
New cards

This can easily be identified by different levels of indentation in code

24
New cards

Indentation makes the code easier for humans to understand

25
New cards

Modulo

Returns the remainder of an integer division.

26
New cards

Constants

-A constant's value cannot change once assigned

27
New cards

-can be used for storing data that doesn't need to change

28
New cards

-makes changing a value throughout code much easier as it only needs to be updated in one place

29
New cards

Variables

-can change their value during the execution of a program

30
New cards

Length(string handling)

Returns the number of characters in a specified string.

31
New cards

postions

Returns the position of a specified character within a string

32
New cards

Substring

Given a starting position and a length, returns a portion of a string

33
New cards

Concatenation

Joining two or more strings together to form a new, longer string.

34
New cards

Random number generation

A built-in function takes a seed value and uses a series of mathematical operations to arrive at a number

35
New cards

Computer generated random numbers

pseudorandom - fake random

36
New cards

Exception Handling

Handling an exception to avoid crashing by

37
New cards
  • Pausing execution of the program
38
New cards
  • Saving the current volatile state of the program on the system stack
39
New cards

-Running a section of code called a catch block

40
New cards

system stack

restore the program back to its previous state before resuming execution.

41
New cards

Subroutines

A named block of code

42
New cards

-Containing a set of instructions designed to perform a frequently used operation -Reduces repetition of code

43
New cards

-Makes code more compact and easier to read

44
New cards

-Can be called by writing their name in a program statement

45
New cards

Functions

  • A type of subroutine
46
New cards

-Required to return a value

47
New cards

Procedures

-A type of subroutine

48
New cards

-not required to return a value

49
New cards

Parameters

Used to pass data between subroutines, specified in brackets after a subroutine call, holding info the subroutine requires to run

50
New cards

Arguments

The actual values passed into a subroutine by a parameter

51
New cards

Function

A subroutine that always returns a value and can appear in expressions or be assigned to a variable/parameter

52
New cards

Local Variable

Can only be accessed from within the subroutine it is declared in, exists only while its parent subroutine executes, and is more memory efficient than a global variable

53
New cards

Global Variable

Can be accessed from any part of a program and exists in memory for the entire duration of the program's execution

54
New cards

Stack Frames

Used by computers to store return addresses, parameters, and local variables for each subroutine call

55
New cards

Call Stack

Where stack frames are pushed when a subroutine is called and popped when it finishes executing, allowing the computer to return to the previous subroutine

56
New cards

Iteration vs Recursion

When a problem can be solved recursively, it can often be solved using iteration; iterative solutions are often easier to program, but recursive solutions can be more compact in code

57
New cards

Recursive Subroutine

A subroutine defined in terms of itself that must include a stopping condition (base case) to prevent a stack overflow

58
New cards

Base Case

A stopping condition in a recursion that doesn't use recursion to return a result and must eventually be met

59
New cards

Procedural Programming Paradigm

Formed from sequences of instructions executed in order, utilizing procedures that can be called from anywhere including recursively[cite

60
New cards

Local Scope

Data structure only accessible from within the structure it is declared in[cite

61
New cards

Global Scope

Data structure accessible from all parts of the program[cite

62
New cards

Structured Approach 4 Basic Structures

Assignment, Sequence, Selection, Iteration[cite

63
New cards

Advantages of Structured Approach

  1. Keeps programs manageable 2. Easier maintenance 3. Independent module testing 4. Development split across team[cite
64
New cards

Hierarchy Charts

Graphically represent procedural program structure using rectangles for procedures connected by relationship lines[cite

65
New cards

Class

A blueprint for objects specifying properties (data) and methods (instructions)[cite

66
New cards

Instantiation

The process of creating an object from a class (an instance of that class)[cite

67
New cards

Encapsulation

Combining properties and methods into a single entity (object) while hiding internal details[cite

68
New cards

Private (-)

Properties/methods only accessible from within the object itself[cite

69
New cards

Public (+)

Properties/methods providing an external interface to access/modify properties safely[cite

70
New cards

Inheritance

Allows a class to share properties/methods of another class, described as an 'is a' relationship[cite

71
New cards

Polymorphism

'Many forms' - occurs when objects are processed differently depending on their class[cite

72
New cards

Overriding

Subclass re-implements a method with the exact same name as an inherited base class method[cite

73
New cards

Association

A 'has a' relationship where an associated object forms part of container object as a property[cite

74
New cards

Aggregation

Weak association where associated object still exists if container object is destroyed (unfilled diamond arrow)[cite

75
New cards

Composition

Strong association where associated object is destroyed if container object is destroyed (filled diamond arrow)[cite

76
New cards

3 OOP Design Principles

  1. Encapsulate what varies 2. Favour composition over inheritance 3. Program to interfaces, not implementation[cite
77
New cards

Encapsulate What Varies

Isolates changing requirements inside a class so future modifications are easy[cite

78
New cards

Favour Composition Over Inheritance

Composition provides a more flexible relationship between objects than rigid class hierarchies[cite

79
New cards

Interface

A collection of abstract procedures implemented by unrelated classes to share consistent structure[cite

80
New cards

Abstract Method

Declared with no implementation in base class; forces subclasses to define their own implementation[cite

81
New cards

Virtual Method

Method in base class with default implementation that can be overridden by subclasses[cite

82
New cards

Static Method

Belongs to the class itself rather than any instance; invoked directly on the class[cite

83
New cards

Class Diagram 3 Sections

Top = Class Name, Middle = Properties, Bottom = Methods[cite

84
New cards

Class Diagram Visibility Symbols

  • = Public, - = Private, # = Protected (accessible by class and subclasses)[cite
85
New cards

Class Diagram Inheritance Arrow

Unfilled arrow pointing upwards from subclass towards the base class[cite

86
New cards

Moral Issues

Issues concerning an individual's sense of right and wrong, often influenced by friends, family, or teachers[cite

87
New cards

Ethical Issues

Issues relating to society and its collective sense of what is right or wrong, such as the use and misuse of personal data[cite

88
New cards

Cultural Issues

Issues arising from differences in moral values between people in different geographical areas[cite

89
New cards

Legal Issues

Issues that relate to the law, such as the Computer Misuse Act and Data Protection Act[cite

90
New cards

Challenges Facing Legislators in the Digital Age

Enforcing copyright is harder with the Internet, individuals are difficult to trace online, and international services must comply with laws of multiple countries[cite

91
New cards

Digital Technologies Alterations to Society

Enabled massive transformations in capacities to monitor behaviour, amass/analyse personal information, and distribute/publish personal information[cite

92
New cards

Responsibility of Computer Scientists

Computer scientists and software engineers wield power through algorithms and code, meaning they carry a responsibility for the moral/social impacts of their work[cite

93
New cards

Embedding of Values

Software and algorithms inherently embed moral and cultural values[cite

94
New cards

Impact of Scale

Global scale of software gives individual computer scientists the potential to produce great good or cause great harm[cite

95
New cards

Cambridge Analytica Case Study (2017)

Raised ethical and privacy issues when personal data was collected from sources including Facebook users without their consent[cite

96
New cards

WannaCry Case Study (2017)

A piece of ransomware targeting Microsoft Windows with a global impact, notably affecting NHS computer systems in England and Scotland[cite

97
New cards

Algorithm

A sequence of steps that can be followed to complete a task and always terminate[cite

98
New cards

Assignment in Pseudocode

The process of giving a value to a variable or constant, represented by an arrow pointing towards the variable (e.g. counter <- 5)[cite

99
New cards

Sequence in Pseudocode

Instructions that follow on from one another and execute in the order they appear[cite

100
New cards

Selection in Pseudocode

Choosing an action based on comparing values using IF, ELSE IF, ELSE, and END IF[cite