Revise - 2.3 - Robust programs

Revise - 2.3 - Robust programs
1 / 18
next
Slide 1: Slide
ComputingUpper Secondary (Key Stage 4)GCSE

This lesson contains 18 slides, with interactive quizzes and text slides.

Items in this lesson

Revise - 2.3 - Robust programs

Slide 1 - Slide

DEFENSIVE DESIGN

Slide 2 - Slide

Forms of Defensive Design?

Slide 3 - Mind map

Anticipate Misuse
Maintain code
Verification
Validation
Reduce errors through testing
Input Sanitisation

Slide 4 - Slide

What is input sanitisation

Slide 5 - Open question

What does validation mean?

Slide 6 - Slide

Validation checks?

Slide 7 - Mind map

Validation checks
Range check
Presence(existence) check
Format(type) check
Length check
Check digit

Slide 8 - Slide

Length Check
Has a minimum amount of characters
Range Check
Falls between two set values
Presence Check
Must be filled in - cannot be blank
Format(type) check
Must be in correct format or datatype

Slide 9 - Slide

What is authenication?
How is it different to Validation?

Slide 10 - Slide

Describe TWO ways to more easily maintain your coded solutions [4]

Slide 11 - Open question

Easy to Maintain
Add comments - to explain key features and understanding to code
Indentation - to separate different statements.  Makes code easier to read
Sensible naming - of variables/procedures to they are recognisable easily
Use functions/procedures - to break up reusable code to avoid duplications

Slide 12 - Slide

Describe the purpose of testing code [2]

Slide 13 - Open question

When should you test code?

Slide 14 - Slide

Identify the two types of error you will encounter when programming [2]

Slide 15 - Open question

LOGICAL
SYNTAX
a = 5
b = 2
C = a+b
print(c)
primt("hello world")
if a>b
  print("bigger")
else
 print("smaller")
name = "Bob"
print("name")
if a>18:
  print("adult")
else:
 print("child")
while a !=0:
  print(a)

Slide 16 - Drag question

4 types of test data

Slide 17 - Mind map

A system is made to store student test scores that are out of 100. Identify suitable test data to run a valid, invalid, boundary and erroneous test. Separate your answers with commas [4]

Slide 18 - Open question