IB computer science

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/254

encourage image

There's no tags or description

Looks like no tags are added yet.

255 Terms

1
New cards
Constructor
In OOP a special type of method which has the same name as the class and is used to create objects. This creation process is known as instantiation.
2
New cards
Instantiate
The creation of an instance or particular realisation of an abstraction or template such as a class. The product of this is an object of the class type. In OOP this is done by using a particular method called a constructor.
3
New cards
Object/Instance
When a class is instantiated the product is one of these. In OOP it is normally what is returned from the constructor.
4
New cards
Class
An extensible program-code-template for creating objects, providing initial values for state (member variables) and implementations of behavior (member functions or methods).
5
New cards
Method/Subroutine
A procedure associated with an object class. These procedures should be logical in terms of scope and function and written to encourage re-use.
6
New cards
Variable
A storage location paired with an associated symbolic name (an identifier), which contains some known or unknown data referred to as a value. In many computer languages the data type is defined and fixed.
7
New cards
Static
A Java keyword. It can be applied to a variable, a method or an inner class. The variables, methods or classes defined by this keyword have a single instance for the whole class and all it's associated objects. It can be accessed when no Object has been instantiated.
8
New cards
Final
A Java keyword. It can be applied to a variable, a method or class and indicates that it cannot be changed , derived from over ridden or extended.
9
New cards
Public
An access modifier. A class, method, constructor or interface that is declared like this can be accessed from any other class.
10
New cards
All methods, and variables declared like this are inherited by subclasses.

11
New cards
Private
An access modifier. Variables, methods and constructors that are declared like this can only be accessed from within the class.
12
New cards
It is the most restrictive access level. Classes cannot be declared like this.

13
New cards
It is the main way that an object encapsulates itself and hides data from outside the class.

14
New cards
Protected
An access modifier. Variables, methods and constructors that are declared like this can only be accessed by subclasses in other packages or from other classes within the same package.
15
New cards
Cast
A reference to one object or data type can be changed to a reference to another object or data type by this process. The objects in the class need to be related by inheritance or in the case of primitives have a defined way of changing available.
16
New cards
Inheritance
In this coding construct a class that is derived from another class is called a subclass (also a derived class, extended class, or child class). The class from which the subclass is derived is called a superclass (also a base class or a parent class).
17
New cards
Subclasses gain access to the public and protected members and methods of the superclass directly but not the private members and methods. Hence the Objects of the subclass become hybrids of the super and sub classes.

18
New cards
Polymorphism
In simple terms it is the ability to define a method of the same name that operates differently depending on the class in which it is defined not the data type of the object from which it is referenced.
19
New cards
Encapsulation
This is used to refer to one of two related but distinct notions, and sometimes to the combination thereof:
20
New cards
A language mechanism for restricting access to some of the object's components.

21
New cards
A language construct that facilitates the bundling of data with the methods (or other functions) operating on that data.

22
New cards
Extensibility
Something, such as a program, programming language, or protocol, that is designed so that users or developers can expand or add to its capabilities
23
New cards
Getter/Accessor
A method that returns a member variable and helps to maintain it's encapsulation.
24
New cards
Setter/Mutator
A method that can be used to limit or restrict the changes allowed for a member variable. This can maintain a limited amount of encapsulation.
25
New cards
Exception
An event, which occurs during the execution of a program, that disrupts the normal flow of the program's instructions. When an error occurs within a method, the method creates an object and hands it off to the runtime system.
26
New cards
Primitive
Datatypes that are not derived from the Object class and are directly contained values. Java has 8 of these:
27
New cards
byte

28
New cards
short

29
New cards
int

30
New cards
long

31
New cards
char

32
New cards
float

33
New cards
double

34
New cards
boolean

35
New cards
Data Type
In Java, every variable has a type declared in the source code. There are two kinds of types: reference types and primitive types. Reference types are references to objects.
36
New cards
Object Oriented Programming
It provides a clear modular structure for programs which makes it good for defining classes and their associated objects. These classes can be implemented so as to keep details of the algorithms and data hidden through a clearly defined interface. This encourages encapsulation.
37
New cards
The classes may inherit from one another to promote reusability of code and methods can be over ridden in class hierarchies giving rise to the benefits of polymorphism.

38
New cards
Procedural Program
Code that has a traditional start to finish flow and does not support classes, inheritance, polymorphism or encapsulation.
39
New cards
Algorithm
A process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.
40
New cards
Initialization
A special kind of assignment: the first, before, objects have null value and primitive types have default values such as 0 or false. Can be done in conjunction with declaration.
41
New cards
Association
A relationship between two objects which may be either a dependency (uses) or aggregation (is made up of).
42
New cards
UML
A way of defining the interface, methods, member variables of a class and how they relate to other classes in the system in a graphical form.
43
New cards
Aggregation
A relationship between two objects which indicates that one is made up of the other. For example a car has a relationship with it's wheels.
44
New cards
Decomposition
The breaking down of a complex problem into smaller parts that are easier to understand. In the case of OOP systems are broken down into smaller classes or objects.
45
New cards
Abstraction
The process of identifying the properties and behaviours of real things or ideas that need to be represented in code.
46
New cards
Dependancy
A relationship between two objects where one requires, but does not instantiate another
47
New cards
Arguments/Parameters
Objects or primitives passed into a method for use by it's internal algorithms.
48
New cards
Return
The output of a Function and a keyword in Java.
49
New cards
Procedure
A type of method that performs a task and does not return a value
50
New cards
Function
A type of method that may performs a task but will always return a value
51
New cards
Overloading
Methods within a class that have the same name and return the same data type but take different arguments.
52
New cards
Over riding
Methods within an inheritance hierarchy that have the same signature ( return, name and arguments) but different implementations depending on the class they are defined in. This is the basis of polymorphism.
53
New cards
Maintainability
The ease with which changes and fixes can be made to a program.
54
New cards
Libraries
Collections of related code that can be imported into a program to allow the developer to perform standard actions in a re-usable and easy way.
55
New cards
Instance Variable
A variable defined in a class (i.e. a member variable), for which each instantiated object of the class has a separate copy, similar to a class variable. Static variable are not included in this definition.
56
New cards
Local Variable
Variables that are only visible within the block of code within which they are declared. These blocks may be method wide, or within a loop or if for example. The area of it's visibility is known as it's scope.
57
New cards
Signature
The method declaration. It is the combination of the method name, return type and the parameter list.
58
New cards
Extends
A keyword used to indicate that one class inherits from another.
59
New cards
Algorithm
A series of steps designed to solve a mathematical or other problem
60
New cards
Pseudocode
A method of describing an algorithm using structured English close to programming langauge
61
New cards
Flow chart
A diagrammatic method of showing the structure and data flow to define a problem and its solution
62
New cards
Flowchart Symbol: Rectangle
A process to be completed
63
New cards
Flowchart Symbol: Rhombus
A decision
64
New cards
Flowchart Symbol: Oval
Start or End to an algorithm
65
New cards
Machine code
Instructions in binary used by the CPU
66
New cards
Assembly Language
A low-level programming language that uses more memorable mnemonic codes and labels to represent machine-level code. Each instruction corresponds to just one machine operation
67
New cards
Assembler
A program to convert assembly-level commands into machine code
68
New cards
Low-level Language
a programming language that requires little or no translation to produce machine code.
69
New cards
High-level language
A programming language that resembles natural language. Each instruction translates to many machine instructions. It is problem based rather than machine based
70
New cards
Fundamental Operation
A task that can be performed natively by a CPU
71
New cards
Compound Operation
A task that requires a combination of many fundamental operations for a CPU to complete
72
New cards
Source Code
The program written by the end user in a high-level language before it is converted to machine code
73
New cards
Compiler
Translation software that converts high level source code into machine code by analysing whole blocks of source code
74
New cards
Interpreter
Translation software that converts source code into machine code by analysing only one source code instruction at a time.
75
New cards
Selection
Using a condition to decide on what instructions to execute next
76
New cards
Iteration (loop)
A group of instructions is executed repeatedly until a condition is met
77
New cards
Integer
Whole number, positive or negative, with no decimal or fractional part
78
New cards
Boolean
A value that can only be true or false
79
New cards
Character
A single letter, number, or symbol
80
New cards
String
A series of letters, numbers, and/or symbols
81
New cards
Primitive Variable
A label referring to a location in memory containing a value that can be accessed or changed by a program
82
New cards
Constant
A label referring to a location in memory containing a value that can be accessed but not changed by a program
83
New cards
Declaration
Identifying a variable or constant or array to a program so that memory space can be aollocated
84
New cards
Assignment
Setting the value of a variable
85
New cards
Operator
A logical, arithmetic or comparison symbol
86
New cards
Comparison
Comparing the values of two items and returning TRUE of FALSE depending on the results
87
New cards
Syntax error
The rules of a language are broken by the program
88
New cards
Logic error
The program produces results that are different to what the programmer expected
89
New cards
run-time error
The program encountered a value, condition, or state that was not executable.
90
New cards
Validating data
Data used in testing that represents normal data that could be expected
91
New cards
Bubble Sort
A simple algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted
92
New cards
Selection Sort
Repeatedly finds the next largest (or smallest) element in the array and moves it to its final position in the sorted array.
93
New cards
Binary Search
Start examining values of an array in the center and narrow down your search, halving the search area each time.
94
New cards
Linear Search
Examine the values of each element in an array one by one
95
New cards
Method
A re-usable unit of code. When called, execution returns to the source of the call when the unit is complete
96
New cards
Procedure
A method that does not return a value
97
New cards
Function
A method that returns a value
98
New cards
Parameter
a value passed to a method
99
New cards
Array
A data structure containing a fixed-size list of values/objects of the same type
100
New cards
Index
an integer that refers to the position of data in an Array