Design, testing and translations Flashcards
1
Q
What could be used to structure your programming?
A
Subroutines and functions could be used to decompose a problem.
2
Q
What are the advantages of structured programming?
A
- Easier to test (each can be tested individually),
- Each subroutine can be reused,
- Each subroutine can be edited at the same time because they are individual modules, that are not connected,
- Subroutines are small and simple because they are programmed to carry out simple decomposed parts of the problem.
3
Q
What is input validation?
A
Checking if data meets certain criteria before passing it into the program. Like checking if an email has the ‘@’ sign.
4
Q
What is a syntax error?
A
When the compiler or interpreter doesn’t understand something you’ve typed because it doesn’t follow the rules or grammar of programming language.
5
Q
What is a logic error?
A
When the compiler to interpreter is able to run the program, but the program does something unexpected.
6
Q
What is a high level language?
A
- Easy to read,
- Can be stored in lots of data types,
- must be translated into machine code for the computer to understand,
- The same code will work for lots of different machines and processors.
7
Q
What is a low level language?
A
- Usually written for one type of machine,
- Very difficult to read,
- Can be executed straight away with no translation,
- Usually not used by people because it is hard to read so inefficient to code in,
- Also not very adaptable to other devices.