Save
...
OCR - Computer Science
Paper 2
2.3 Robust Programs
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
ilhan
Visit profile
Cards (14)
what is validation in programming?
Validation is checking whether
input data
should be allowed or is sensible and follows criteria
Types of validation
Range Check
- Checks data is
sensible
limits
Type
check
- checks data is the
correct
data type
Format
check - checks data is entered in
correct
format
Presence
check - checks data is
entered
and not
blank
Length
check - checks
length
of input is within certain
amount
What is authentication?
Ensuring only allowed/
authorised
user can gain access
E.g
username
and
password
, number of
bank account
What is anticipating misuse?
The practice of anticipating all
possible
way a user could misuse a device
maintainability of a program
comments-
enables a
programmer
to
understand
the purpose of a line of code used
indentation
- improve
readability
and
clearly
shows each block of code
naming
conventions- using
sensible
names/ variables so it’s easier to
understand
use of
sub-program
- easier to
debug
code,
reuse
code and easier to
test
Purpose of testing:
to find
errors
and fix them
To ensure
output
is correct
End result meets user requirements
Two types of testing are?
iterative
testing
Final/terminal
testing
What is iterative testing?
tested during
development
Programmer develops
module
tests it and
repeats
until module works as expected
What is final/terminal testing?
tested
after
development
and before program is
released
Takes place once all
module
are tested so programs works as
expected
Test data
used to test wether a program is
functioning
properly
Types of test data:
valid data
-
sensible
data that program should accept and be able to process
boundary
data - data at the
extreme
boundary
of any data ranges , ensures that system only allows data up to the
max
and
min
value
erroneous
data- data that program can’t process and accept
Two types of errors:
Syntax error
Logic error
What is syntax error?
an error in the
grammar
of the program or an error that breaks the rules of the
programming language
contain an error and will not run
What is a logic error?
an error that results in
incorrect
output
or
unexpected
result
contain error but still run and produce wrong output