Chap 7 - algorithm design & problem sloving Flashcards
(13 cards)
stages of program development life cycle & what they mean
-analysis - process of investigation to find a solution to the program; uses defragmentation & abstraction
-design - doc with tasks required for solution; uses structured charts, flowcharts, pseudocode
-coding - writing programs required
-testing - text the completed program to make sure it works under all conditions
-maintenance
what is decomposition
breaking down a problem into more manageable parts; decompose a computer system into its inputs, process, outputs & storage
what is abstraction
simplifying a problem by focusing on essential details than the unnecessary details
structure diagrams
shows hierarchy of sub systems
flow charts
-shows the algorithm
has symbols to learn
pseudocode
-simple method of showing an algorithm
validation
ensure only reasonable data is accepted
verification
check that data is not changed when entered
types of verification check
-double entry - data entered twice & compared to ensure both are the same
-screen/ visual check - manual check that ensures data on screen is same as the form
types of validation check
-range check - value is btw upper & lower values
-length check - data entered is of reasonable no. or an exact no. of char
-type check - data entered is of given type
-presence check - ensure data has been entered so the value is not left blank
-format check - char entered are conformed to a pre-defined pattern
test data
-ensure algorithm works as expected with no errors
-use trace table to check
type of test data
-normal - data accepted which the algorithm is expected to work with
-abnormal - data is rejected by algorithm as unsuitable
-boundary - plus, minus 1 from the extreme data
-extreme - largest & smallest values accepted
trace table
-records results from each set in algorithm using text data
-identify variables
-first row is always dedicated to initialized variables
-do it slowly, 1 by 1