Fundamentals of Programming Flashcards

1
Q

What is a variable?

A

An item of data, that is referenced to by a variable name and whose value can change during running.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a data type?

A

Determines what sort of data is being stored and how it will be handled by the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a memory address?

A

A specific location in memory where data or instructions are stored.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is assignment?

A

The process of giving a value to a variable/ constant.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a constant?

A

An item of data whose value doesn’t change.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why is it important to use meaningful names?

A

Helps trace bugs.
Allow other programmers to follow your code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is debugging?

A

The process of finding and correcting errors in a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is declaring?

A

When you define variables in terms of their name and data type before using them in your program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is an integer?

A

Any whole number.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a real/ float?

A

A number that has a fractional part.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a string?

A

Stores multiple characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a Boolean?

A

True/ False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a character?

A

An individual character.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is date/time?

A

Stores data in a format easily identified as date/time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a pointer/ reference?

A

References a memory location in the computer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is an array?

A

A set of related data items stored under a single identifier.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is a element?

A

A single value within a set or list.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is a record?

A

One line of a text file with multiple different data types.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are built-in data types?

A

Data types provided with the programming language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are user-defined data types?

A

Users own data types, typically a combination of built-in data types.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What are the three programming constructs?

A

Sequence
Selection
Iteration.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is sequencing?

A

Making sure every line of code is executed in the correct order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is syntax?

A

Rules on how words are used in a given programming language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is selection?

A

The principle of choosing what action to take based on a certain criteria.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What is nesting?

A

Instructions within instructions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is iteration?

A

Repeating processes until a condition is met.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is definite iteration?

A

Repeating a certain number of times.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What is indefinite iteration?

A

Repeated until an event happens.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What are arithmetic operations?

A

Mathematical operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What are relational operations?

A

Comparisons between two data items.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What are Boolean operations?

A

Those which result in True/ False.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

What are string-handling functions?

A

Length, position, substring, concatenation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

What is a character code?

A

Binary representation of a particular character.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

What are subroutines?

A

A named block of code that carries out a specific task.
Self-contained with a unique identifier.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What are functions?

A

Subroutines that return a value.

36
Q

What are the advantages of using functions/ subroutines?

A

Easier to understand code
Easier to test and debug
Allows collaboration
Prevents rewriting code
Easy to alter one version of a function

37
Q

What is functional programming?

A

A paradigm that uses functions to create programs.

38
Q

What is a parameter?

A

A variable that identifies the data you want a subroutine to take in and use.

39
Q

What are arguments?

A

Actual data being passed into a subroutine.

40
Q

What is a block interface?

A

A block of code that specifies the type and characteristics of data being passed in.

41
Q

What is a local variable?

A

A variable only available in specific functions and subroutines.

42
Q

What is a global variable?

A

A variable that’s available anywhere in the program.

43
Q

What are advantages of local variables?

A

Cannot accidentally change the value elsewhere.
Can use a variable name in a different sections and both are completely separate.
Free’s up memory as it is removed once used.

44
Q

What are catch blocks?

A

Blocks of code that are triggered in response to specific errors.

45
Q

How to catch blocks work?

A

1) Error thrown so subroutine is paused
2) Current state of subroutine saved
3) Catch block executed which handles the error.
4) Subroutine picks up from where it was saved.

46
Q

What are procedural programming languages?

A

Where the programmer specifies the steps that must be carried out in order to achieve a result.

47
Q

What are imperative programming languages?

A

Based on giving the computer commands or procedures to follow.

48
Q

What are hierarchy charts?

A

A diagram that shows the design of a system from the top down.

49
Q

What is the top-down approach?

A

When designing a system you start at the top procedure and work down to smaller and smaller subroutines.

50
Q

What is a module?

A

A self-contained part of the program that ca be worked on in isolation.

51
Q

What is a flowchart?

A

A diagram using standard symbols that describes a process or a system.

52
Q

What does an oval represent on a flowchart?

A

Start/ Stop

53
Q

What does an rectangle represent on a flowchart?

A

Process

54
Q

What does an parallelogram represent on a flowchart?

A

Input/ Output

55
Q

What does an diamond represent on a flowchart?

A

Decision

56
Q

What is a system flowchart?

A

A diagram showing individual processes within a system.

57
Q

What is pseudo-code?

A

A way of writing code that shows the purpose of the program without using constructs or syntax.

58
Q

What is a dry-run?

A

The process of stepping through each line of code to see what will happen before the program is run.

59
Q

What is a trace table?

A

A method of recording the result of each step that takes place when dry-running code.

60
Q

What are the advantages of dry-running?

A

Identifies errors before time is spent coding it.

61
Q

What is a breakpoint?

A

Stops the execution of a program so the programmer can check the variables at that point.

62
Q

What is modular design?

A

A method that breaks down a whole system into smaller units or modules.

63
Q

What are the advantages of OOP?

A

Easy to amend programs, as you only have to edit the affected module.
Easy to add new functionality with new module.
Allows for collaboration.
Objects can inherit attributes, making code reusable.
Changes within objects may not affect other objects.

64
Q

What is encapsulation?

A

The concept of keeping data and code within the same object.

65
Q

What is a method in OOP?

A

Subroutines within an object designed to perform particular tasks on data within the object.

66
Q

What is information hiding in OOP?

A

When data is directly in the object that uses it.

67
Q

What is a class in OOP?

A

Defines the properties and methods of a similar group of objects.

68
Q

What are properties in OOP?

A

The defining features of an object and class, describes how the data and methods can behave.

69
Q

What is an object in OOP?

A

A specific instance of a class, with the same properties as that class.

70
Q

What is inheritance in OOP?

A

A concept that properties and methods in one class can be shared with subclasses.

71
Q

What do subclasses contain?

A

Properties and methods defined in the base class and any properties and methods unique to the subclass.

72
Q

What are inheritance diagrams in OOP??

A

Diagrams that show the relationship between classes and subclasses. (Hierarchical structure)

73
Q

What are class diagrams in OOP?

A

Diagrams that represent the properties, methods and relationships between classes.

74
Q

What does the symbol + mean in class diagrams in OOP?

A

The properties and methods are public to all classes.

75
Q

What does the symbol - mean in class diagrams in OOP?

A

The properties and methos are private and only used in that class.

76
Q

What does the symbol # mean in class diagrams in OOP?

A

The properties and methos are protected and so can only be used in its class and any of its subclasses.

77
Q

What is instantiation in OOP?

A

The process of creating an object from a class.

78
Q

What is a constructor subroutine in OOP?

A

__init__
Called when an object in instantiated from a class to initialize the object.

79
Q

What is polymorphism in OOP?

A

A situation where a method inherited from a base class can be redefined and used in different ways depending on the data in the subclass.

80
Q

What is overriding in OOP?

A

When a subclass implements a method.

81
Q

What is a static method in OOP?

A

A method that can be used without an object of the class being instantiated.

82
Q

What is a virtual method in OOP?

A

A method defined in the base class that can be overridden by a method in the subclass where it will be used.

83
Q

What is an abstract method in OOP?

A

A method not supplied in the base class but in the subclass.

84
Q

What is aggregation in OOP?

A

A method of creating new objects that contain existing objects, based on how they are related.

85
Q

What is composition aggregation in OOP?

A

One object composed of two or more existing objects.

86
Q

What is association aggregation in OOP?

A

One object made up of one or more objects, that is not entirely dependent on them for its existence.