Note AcademyNote Academy

Computer Science · May / June 2022 · Paper 21 · Question 3

0478

As printed in the paper

The question as text

Give one piece of normal test data and one piece of erroneous test data that could be used to validate the input of an email address. State the reason for your choice in each case. Normal test data Reason Erroneous test data Reason [4]

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme

One mark per mark point, max four

Normal test data

computerscience@cambridge.org.uk

Reason

this is a valid email address (containing the @ symbol) and should be accepted

Erroneous test data computerscienceisgreat
Reason

this is just a string, and should be rejected (as an email address needs a single ’@’)

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.