design, testing and IDEs Flashcards
what do structure diagrams do
show the smaller tasks of a larger program
how are structure diagrams made
by decomposing the program into manageable modules, this modules are then further broken down and eventually into modules that perform individual tasks
what are the advantages of using structure diagrams
- coding is easier because you’re only writing the code for simple tasks
- lots of programmers can work on one program
- easier to test your program as each module can be tested individually
- individual sub programs can be fixed and updated without affecting the rest of the program
- you can reuse sub programs
how can you make sure a program is well-maintained
- comments explaining what key features of the program do
- indentations to separate different parts of the program
- variables, subprograms and parameters should be named
- using sub programs
what should programmers look out for in defensive design
- anticipate how users might misuse their program
- ensure their code in well maintained
- reduce the number of errors in the code through testing
what is input validation
checking if data meets certain criteria before passing it into the program
what are some of the different types of input validations checks
- range check = checks the data is within a specified range
- presence check = checks the data has actually been entered
- format check - checks the data has the correct format
- look-up table = checks the data against a table of acceptable values
- length check = checks the data is the correct length
what is a common way programs use authentication
passwords
what is a syntax error
doesn’t follow the rules or grammar of the programming language
what is a logic error
able to run the program but the program does something unexpected
what are the two types of testing
iterative testing = program is tested while it is being written
terminal testing = program is tested at the end
what are the two types of testing
iterative testing = program is tested while it is being written
terminal testing = program is tested at the end
what is the advantage of iterative testing
used to identify and fix small errors which help prevent larger errors from occurring later on
what is the advantage of terminal testing
modules may work perfectly on their own, but errors may occur when the modules interact which each other
what are the 4 different test datas
- normal data = things the user is likely to input into the program
- boundary/extreme data = values at the limit of wha the program should be able to handle
- invalid data = inputs with a correct data type that should be rejected
- erroneous data = inputs with the incorrect data type and should be rejected