Chapter 1 Flashcards Preview

Computer Science Aqa A Level > Chapter 1 > Flashcards

Flashcards in Chapter 1 Deck (20)
Loading flashcards...
1
Q

asasignment

A

giving a value to a variable on constant

2
Q

variable

A

item of data that can be changed throughout the lifetime of a program

3
Q

constant

A

item of data that cannot be changed throughout the lifetime of a program

4
Q

What is a local variable?

A

a variable wthat’s scope is only within a certain subroutine

5
Q

What are the benefits of subroutines?

A

code reuse, easier to design

6
Q

What are the various types available in most languages?

A

integer, float, string, Boolean, list/array

7
Q

what is the difference between a list and an array?

A

An array is fixed in size(static) and a list is dynamic

8
Q

when would you use a while loop and when would you use a for loop?

A

while loop when you are not sure how long it will repeat (indefinite iteration) and a for loop is sued when you know how many (definite iteration)

9
Q

what is 14%5

A

4

10
Q

what is concatenation

A

the operation of merging 2 stings into one string

11
Q

What is the difference between a procedure and a function

A

a procedure carries out a sequence on instructions and doesn’t return anything, where as a ffunction must return a valie

12
Q

what is a parameter

A

data passed into a subroutine

13
Q

there are two types of subroutine - what are they

A

function and procedure

14
Q

A2: what is encapsultaion

A

the concept of putting properties and methods in one object

15
Q

A2: what is a method

A

a routine within an object

16
Q

A2: What is a class

A

a blueprint that definies the properties and methods of similar objects

17
Q

A2: what is an object?

A

A specific instance of a class

18
Q

A2: what is inheritance?

A

using a class to share the porperties and methods wwith a subclass

19
Q

A2: what is polymorphism

A

havin the same method name with different arguments

20
Q

A2: what is overriding?

A

changing the implementation of a method in a subclass. This new method takes precedence over the method in the baseclass.