Everything you know about defensive design. (Methods)
1 / 18
volgende
Slide 1: Woordweb
ComputingUpper Secondary (Key Stage 4)GCSE
In deze les zitten 18 slides, met interactieve quizzen en tekstslides.
Onderdelen in deze les
Everything you know about defensive design. (Methods)
Slide 1 - Woordweb
Defensive design
Aspire: To identify key methods of defensive design.
Conquer :Solve exam level questions.
Slide 2 - Tekstslide
Why?
We need to consider how end users will make use of the product.
We need to anticipate any way they may misuse the software, either willingly on unwillingly.
Slide 3 - Tekstslide
Methods
Anticipate Misuse
Maintain code
Verification
Validation
Reduce errors through testing
Slide 4 - Tekstslide
Anticipate misuse.
Planning ahead and taking steps to prevent potential misuse.
This takes place during the design and testing process before product release.
Slide 5 - Tekstslide
Input validation
This is the process of checking data entered by the end user to ensure it meets specific criteria.
Example: Dates, phone numbers.
Slide 6 - Tekstslide
Data Validation methods.
Range check
Format check
Presence check
Length check
Type check
The input must fall within a specified range
The data must be in the correct order.
The data must be of a specified data type
Checks if data has been entered.
The input must not be too long or too short.
Slide 7 - Sleepvraag
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 8 - Tekstslide
What is authentication? How is it different to Validation?
Slide 9 - Open vraag
Authentication
Authentication is the process of a user confirming that they are who they say they are on a computer system.
Methods:
Passwords
2FA
Biometrics, cards, Pin, Secret question.
Slide 10 - Tekstslide
Maintainability
The purpose of maintainability is to ensure that, over time, a program can be easily maintained.
This could mean fixing errors, making changes or additions.
Slide 11 - Tekstslide
Describe TWO ways to more easily maintain your coded solutions [4]
Slide 12 - Open vraag
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 13 - Tekstslide
Describe the purpose of testing code [2]
Slide 14 - Open vraag
Identify the two types of error you will encounter when programming [2]
Slide 15 - Open vraag
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 - Sleepvraag
Test types
Valid - Test that falls in the expected range of a request.
Invalid - Data of the correct data type, but does not meet the rules.
Erroneous - Entering the wrong data type.
Boundry - Data at the min and max of a range.
Slide 17 - Tekstslide
A system is made to store student test scores that are out of 0 to 100. Identify suitable test data to run a valid, invalid, boundary and erroneous tests. Separate your answers with commas [4]