Other stuff Flashcards
What is a record?
A data structure which allows related data of different data types to be stored together
Flowchart notation:
Arrow - denotes next process
Rectangle - Process
Parallelogram - Input/ Output
Oval - Start/End
Rhombus - Decision
What are the advantages of using local variables?
Can only be changed within the structure they’re declared in, so programmer doesn’t accidently alter other parts of the program.
Can declare the same variable outside the program, as parameters are not present unless the subroutine is called.
Subroutine with only local variables is self-contained, so can reuse it in another program without having to declare any variables.
What are some examples of structured programming?
Subroutines
Decomposition
Interface to interact with user
- all make the program easier to read and understand.
How can the efficiency of an algorithm be determined?
e.g. fewer variables, fewer steps,
What are the advantages of using subroutines?
e.g. save time by avoiding repeating code, make program easier to read, programmer can
How does notation make a program easier to maintain?
It improves readability and separate different statements in a program.
How can comments make a program easier to maintain?
Used to explain code.
How can appropriate variable names make a program easier to maintain?
The make it clear what the purpose of the variable is which makes the program easier to understand