thinking procedurally Flashcards

1
Q

procedural abstraction

A

using a procedure to carry out a sequence of steps for achieving some task eg calculating grade across 3 papers, buying groceries online

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

procedure interface

A
programmer doesn't need to know how procedure works, only: 
what procedure is called
arguments required
data types of arguments
order written in
documentation: I/O and preconditions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

eg if need to change one property of all objects

A

don’t need to change procedure, only call with different arguments

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

problem decomposition

A

computational problems needed to be broken down into subproblems before solved. eg menu of choices, each choice results in different self contained module

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

top down design (decomposition)

A

breaking down a problem into major tasks to be performed. These are broken down into separate subtasks repeatedly until each subtask is sufficiently simple to be written as a self contained module/subroutine. Useful for breaking down into small, manageable tasks

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

advantages of problem decomposition

A
  • easier to write
  • simpler to debug and maintain
  • easy to make changes (easy to find where to make changes) without affecting rest of program if self contained and well documented I/O/preconditions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

hierarchy chart

A

tool for representing the structure of a program, showing how modules relate to each other to form a complete solution

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