modular programming Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

decomposition

A

break down large problem into smaller problems.

break down a large program into sub- procedures (modules)

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

procedures

A

do not return a value

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

functions

A

do return a value

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

advantages of decomposition/ modular programming

A
  • each small prob is easier to solve
  • can share programming among a team
  • program more readable
  • modules are re- usable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

how modules are held in memory

A

a new area of memory opens while the module runs and closes when it finishes running

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

local variables

A

can only be used inside the module

lost when the module closes

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

global variables

A

can be used anywhere in the program

changes to them are permenant

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

parameters

A

values passed from main prog to module

are used like variables in the module

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

returned values

A

when function stops a single value can be returned to the main program.

it must be captured or it will be lost.

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

parameter passed by value

A

module gets a copy of the value, and it does not change the values in the main program

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

parameter passed by reference

A

the module gets access to the original variable’s memory location. therefore it can change values used in the main program without using return.

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