Prelim - Ch. 5 - Software Solutions Flashcards

1
Q

Give an example of an event driven language and explain how it works.

A

Visual Basic is an event driven language where subroutines are executed in response to a certain event occurring.
For example, hitting a command button causes the execution of a subroutine attached to that command button’s ‘click event’.

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

What has to happen before a variable can be used within program code?

A

It must be defined and declared. This means giving the variable:
• a name (identifier)
• describing its data type/ data structure

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

What is an identifier?

A

A name given to a variable, subroutine, or function. It must start with a letter, and is normally comprised of letters, digits and an underscore.

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

What are assignment statements?

A

Assignment statements are used to set the value of variables (and properties).
The result must have a compatible data type for the variable (str - str, int - int)

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

What is sequence?

A

Sequence is the control structure that ensures each process is executed in the correct order (in Visual Basic a new line does this). Event driven languages will have the largest number of possible sequences.

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

What do most languages use for selection?

A

If statements

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

What are the two types of repetition and how are they expressed?

A

Pre-test
While (condition)
Do something
End While

Post-test
Repeat something
Until (condition)
End Repeat

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