2.2 Problem solving and programming extra Flashcards

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

Explain the term procedural programming language

A

High-level language
Gives a series of instructions in a (logical)
order / line by line / what to do and how to
do it

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

What is high level also known as

A

Imperitive

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

Describe the use of local variables

A

High-level language / 3GL / imperative
language
Gives a series of instructions in a (logical)
order / line by line / what to do and how to
do it

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

What distinguishes global variables from local

A

Defined at start of program
Exists throughout program / in all
modules
Allows data to be shared by modules

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

What is a variable

A

Identifier/name of a …
Memory location used to store data

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

What is scope

A

A range of
statements/procedure/function/method
that a variableis valid for
A local variable takes precedence over
a global variable of thesame
name/allow the same identifier to be
used for different purposes without
conflic

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

Explain the advantages of writing an application using a modular approach.

A

Work is easier to divide between a
team
each team member just needs to know
what values go into their subroutine
and the expected functionality
Saves time as work takes place in
parallel
each team member can work on their
area of expertise.
Breaks problems into smaller areas.
Easier to test/ debug/ read
each subroutine can be tested before
integration.
Code can be reused in the project/
future projects

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

Some features of IDE’S

A

Auto-complete
Can view identifiers / avoid spelling
mistakes
Colour coding text / syntax highlighting
Can identify features quickly / use to
check code is correct
Stepping
Run one line at a time and check result
Breakpoints
Stop the code at a set point to check
value of variable(s)
Variable watch / watch window
Check values of variables and how
they change during the execution
Error diagnostics
Locate and report errors / give detail on
errors

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

Explain why the array scores has been declared as global instead of local

A

It does not need to be passed between
subroutines
It can be accessed/updated at any
point/place in the program
It allows it to be updated as a running
total

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

local and global

A

Memory, local/parameter allows re allocation of memory but in recursion more memory needed as 1 memory space for each call if local/parameter

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

What can IDE debugging produce

A

A crash dump which shows the state of variables at the point where an error occurs

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

What can an IDE display

A

stack contents which can show the sequencing through procedures/modules

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

What does an IDE inserting a breakpoint allow

A

The program to be stopped at a predetermined point in order to inspect its state

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

Describe what is meant by the term IDE (Integrated Development Environment)

A

A (single) program (1) used for
developing programs (1) made from a
number of components (1).

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

What is a function

A

A function is a named section of
program (1) that performs a specific
task (1).
It returns a value (1), it is often called
inline (1)

17
Q

What is a function often called

A

it is often called
inline (1)

18
Q

How do IDE’S make use of breakpoints

A

Use to test the program works up to/at
specific points
Check variable contents at specific
points
Can set a point where the program
stops running

19
Q

What is IDE stepping

A

It can step through code (1 – AO 1.1),
which allows the programmer to watch
the effects each line of code (1 – AO
1.2).

20
Q

How do IDE’S make use of stepping

A

Can set the program to run line by line
Slow down/watch execution
Find the point where an error occurs

21
Q
A