programming structure Flashcards

1
Q

What is a Variable (2)

A

-A variable is the name of a memory location that holds data during program execution.
-Most Programming languages require the programmer to declare all variables by listing their names and their data type.

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

What is syntax (2)

A

-Syntax refers to the set of rules that defines the format of the structure of each type of program instruction.
-All languages have a rule governing how statements should be structured.

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

What is an Algorithm (1)

A

An algorithm is a set of rules or steps that represent the solution to a problem.

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

What is a Sequence(1)

A

Several instructions are executed in the order in which they are listed one after the other. Can contain any number of actions and none can be omitted.

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

What is a Selection(1)

A

Statements may not be executed in the order in which they are listed. Statements are to be executed on a condition. They can be implemented using IF…THEN…ELSE statements.

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

What is iteration (1)

A

Iteration means repetition, so iterative statements always involve performing a loop in a program to repeat several statements. Several loops exist.

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

What is Repetition(1)

A

It’s normal that once a solution to a problem is created, we may wish to use this solution over nad over again for different sets of data.

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

What is a for loop?

A

The instructions inside the loop are executed a set number of times, controlled by a loop counter. An initial value, final value, and increment are specified. Each time the loop is executed, the loop counter is incremented.

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

What is a While loop?

A

The number of times the loop is to be carried out is not known in advance but is controlled by boolean variables.

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

What’s an Until loop?

A

Repetition continues until the condition is true.

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

What is a translation?

A

Code written in a high-level language can be read and understood by humans and requires translation so that the computer can execute the commands in the program.

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

What do translators consist of?(3)

A

ASSEMBLER translates assembly language into machine code.

INTERPRETER translates source code one line at a time. The processors executed a line of code before proceeding to translate the next line of code.

A COMPILER will attempt to convert the whole program into machine code before executing it.

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

What are the properties of object orientation?

A

It contains code that facilitates reading AND writing within an object.

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

What are the methods of object orientation?

A

Inheritance allows new classes to inherit attributes and behaviors from existing classes. This promotes code reuse and facilitates the creation of specialized classes based on more general ones.

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