Edexcel IGCSEGeneralGeneral Applications6 Marks
A programmer uses defensive design when writing a program.
- (a)Explain why defensive design is important.[2]
- (b)(i)Explain what is meant by input validation.[2]
- (b)(ii)Describe an example of input validation.[2]
Mark scheme
Marking points from the official mark scheme. The mark or mark type is shown in brackets.
- 6(a) Up to two of: B1 for each point.
- (To prevent unexpected inputs from causing the program to crash / behave unexpectedly / become corrupted) (1)
- (To prevent malicious inputs from causing security vulnerabilities) (1)
- (To make the program robust / reliable / secure / error-free) (1)
- 6(b)(i) Up to two of: B1 for each point.
- Checking data / input (1)
- To ensure it is sensible / reasonable / meets requirements / valid (1)
- 6(b)(ii) Up to two of: B1 for naming a check, B1 for describing.
- Example: Length check / type check / range check / presence check / format check (1)
- Description: (1) E.g. Length check ensures string / data has minimum / maximum number of characters. / Type check ensures data is of specific type (e.g. integer, string, Boolean). / Range check ensures data is within specific range (e.g. 1-100). / Presence check ensures data is not empty / null. / Format check ensures data is in specific format (e.g. email address, postcode, date).
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →