Exam-style question
Try this first
Which example best demonstrates file path parameterisation?.
- A.Writing a file path directly into several parts of a program.
- B.Passing the file path to the relevant code rather than fixing it inside the code.
- C.Using a global variable for every value in the program.
- D.Replacing meaningful identifiers with shorter names.
Model answer
What a good answer should say
- Passing the file path to the relevant code rather than fixing it inside the code.
Explanation
Why this works
File paths are parameterised when they are supplied to the relevant code as a parameter instead of being fixed within that code.
Common mistake
No common mistake is linked to this question yet.
