As programs grow in complexity it becomes useful to structure them in a way that is more manageable for the programmer.
A structured approach to programming uses a module approach where a program is seperated into subroutines.
A program can be decomposed into smaller subroutines that are easier to solve indepedently.
The interface determines how data will be passed in and out of the subroutine.
Keywords
subroutine
a sequence of instructions with an identifiable name that performs a specific task
interface
describes how a subroutine will interact with the main program
identifer
the name that a programmer gives to a variable, constant, or subroutine
parameters
used in a subroutine to allow values to be passed into them
A common mistake
Mistake:A program must run line by line from top to bottom.
In fact:A subrotuine is an 'out of line' block of code, which is typcially written at the top of a program and then called upon within the main program.
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.Read the licence
Lesson 2 of 2 · GCSE level, ages 14 to 16
Structured programs
By the end:I can describe what is meant by a structural approach to programming and explain the benefit of this approach.
As programs grow in complexity it becomes useful to structure them in a way that is more manageable for the programmer.
A structured approach to programming uses a module approach where a program is seperated into subprograms.
A program can be decomposed into smaller subprograms that are easier to solve indepedently.
The interface determines how data will be passed in and out of the subprogram.
Keywords
subprogram
a sequence of instructions to perform a specific task with an identifiable name
interface
describes how a subprogram will interact with the main program
indentifer
a name for a variable or subprogram
parameters
used in a subprogram to allow values to be passed into them
A common mistake
Mistake:A program must run line by line from top to bottom.
In fact:A subprogram is an 'out of line' block of code, which is typcially written at the top of a program and then called upon within the main program.
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.Read the licence
The wording comes from each publisher. The layout and the links to your syllabus are ours.