Miscellaneous Paper 2 topics Flashcards
maintainability
how well structured a program is and how easy it is for users to understand the purpose of it
methods to help maintainability
comments, indentation, sub-programs
comments in a program
useful for explaining the key features of a program
indentation
separates segments and blocks of code
sub-programs
make it easier for other programmers to see how different parts of a program work
defensive design
methods of ensuring that programs function correctly, and don’t break and produce errors
input validation
checking that data meets certain criteria before passing it into a program
examples of input validation checks
length check, type check, range check, presence check, format check
length check
checks the length of a string e.g ensuring that a password is 8 or more characters in length
type check
checks the data type of a field e.g. checking that a user’s age has been entered as an integer
range check
ensures that data entered as a number falls in a particular range e.g. checking that a user’s age is between 0-100
presence check
looks to see if any data has been entered into a field
format check
ensuring that data has been entered in the correct format e.g. checking whether an email address contains the @symbol and a full stop