Chapter 1 Flashcards Preview

Computer Science Aqa A Level > Chapter 1 > Flashcards

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

asasignment

giving a value to a variable on constant

2

variable

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

3

constant

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

4

What is a local variable?

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

5

What are the benefits of subroutines?

code reuse, easier to design

6

What are the various types available in most languages?

integer, float, string, Boolean, list/array

7

what is the difference between a list and an array?

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

8

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

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

what is 14%5

4

10

what is concatenation

the operation of merging 2 stings into one string

11

What is the difference between a procedure and a function

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

12

what is a parameter

data passed into a subroutine

13

there are two types of subroutine - what are they

function and procedure

14

A2: what is encapsultaion

the concept of putting properties and methods in one object

15

A2: what is a method

a routine within an object

16

A2: What is a class

a blueprint that definies the properties and methods of similar objects

17

A2: what is an object?

A specific instance of a class

18

A2: what is inheritance?

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

19

A2: what is polymorphism

havin the same method name with different arguments

20

A2: what is overriding?

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