paper 2 theory Flashcards
what does an identifier table contain
- list of variable names
- explanation of what that variable does
- datatype of the variable
algorithm
- sequence of instructions
- to implement a task/solution to a problem
features to make a program easier to read/understand
- indentation
- sensible variable names
- comments
- prettyprint
- capitalization of keywords
source code
represents a solution algorithm expressed in high level language
object code
- produced by the compiler during translation stage
- the object code is produced by translating the source code
- not produced by interpreter
pseudocode
a way of using keywords and identifiers to describe an algorithm without following the syntax of a particular programming language
flowchart
graphical representation of an algorithm
verification
- checking that data has not been changed during transfer to a computer
- double entry
- parity check
- checksum
validation
- checking that data meets certain criteria
- range check
- presence check
- length check
integrated development environment (IDE)
software application that combines all the features and tools needed by a software developer
features of an IDE
- pretty print
- automatic indentation
- syntax checking
- highlights any undeclared variable
- dynamic syntax checking
methods to find errors in IDE
- dry run, trace table
- breakpoint: run code to set point to find error
- variable watch: checks the content of variable at specific points
- stepping: execute the code line by line
program development cycle
- amazing: analysis
- doctors: design
- can: coding
- treat: test
- men: maintenance
corrective maintenance
- occurs when testing reveals a fault in the program and this is corrected
- used to amend the algorithm to eliminate errors
adaptive maintenance
- a term used for changes that are made to a program in response to a specification change
- a result of changes to requirements or available technology
perfective maintenance
- mainly deals with implementing new or changed user req
- involves making functional enhancement
- includes enhancing both the function and efficiency of the code and changing the functionalities as per the user’s changing needs
preventive maintenance
performing activities to prevent the occurrence of error
syntax error
small grammatical mistakes, sometimes limited to a single char
logic error
- program does not perform as expected
- errors in the logic of a program
run-time error
- program executes an invalid instruction
- attempts to divide by 0
- program crashes
black box testing
- match expected to actual ans
- person does not need to know the structure of the code
- person chooses normal or boundary data
white box testing
- test every possible ‘logic path’ thru the code
- trace table is often used during the program testing
alpha testing
- in house testing
- testing is done by devs in-house rather than the one that developed the software
beta testing
- out of house testing
- performed by a group of people assigned to find errors in the code
stub testing
- simple/dummy model written to stimulate the model
- test carried out on all modules that have been written
integration testing
the testing of any separately written modules to ensure that they work together
acceptance testing
- used for the completed program to prove to the client that it works as required
- end-user testing
stepwise refinement
- breaking down of an algorithm
- to a level of sufficient detail into smaller parts
- from which it can be programmed
use of subroutine in a program
- to perform frequently used operations within a program
- can be called when needed
- can be reused by another program
why use modules to construct programs
- to find a more manageable solution
- subroutine may be independently tested
- program easier to maintain
advantages of a subroutine
- allows to be called into multiple places
- may be tested independently
- if tasks changes, changes only need to be made once
- reduces unnecessary duplications
procedure
- a sequence of steps that is given an identifier and can be called to perform a sub-task
- does not return a value
function
- a sequence of steps that is given an identifier and can be called to perform a sub-task
- returns a value