Problem solving, design, and programming Flashcards
What is a sub-routine?
It is a set of instructions that perform a frequently used operation in the sun-system of a program.
What is top-down design?
Top-down design is a method of designing a computer system, in which the system is broken down into sub-systems, which are further broken down into sub-systems, until each subsystem performs just a single task.
What are the advantages of using this type of design?
- Division of labor - reduces design time
- Accounts for differences in skills of programmers - everyone does not have to be proficient in everything.
- Problems are broken down into manageable parts- easier to find a solution.
What is a library routine?
It is a set of instructions to perform a task that is already available for use.
What are the different types of test data?
Normal data - Which is accepted
Abnormal data - Rejected
Boundary data - Establishes what the smallest and largest data that are accepted are
Extreme data - Largest and smallest values that are accepted
Blank data - No data is given
What is the difference between validation and verification?
Validation is checking data against a set of criteria to make sure that is correct. Verification is making sure that data has been copied/transferred correctly.
What are some examples of validation checks? (include how to calculate check digit)
- Character checks - check for invalid characters, eg. accents
- Range checks - Does the data fall within the given range?
- Length check - Does the data exceed the set length limit?
- Format check - Is the data in the right format, eg. in image?
- Type check - Is the data the valid type of data? Eg. when only alphabetical data is allowed.
- Check digit:
- Add all odd numbers
- Add all even numbers and divide the result by 3.
- Add result from 1 and 2 and divide it by 10
- Take the remainder - is it is 0, use the above number, else subtract it from 10 to find the check digit
What are some examples of verification checks? (include how to calculate check sum)
- Double entry - Data is entered twice and checked for inconsistencies, eg. passwords
- Visual check - User is asked if the data entered is correct
- Parity checks - Even/odd parity to make sure that data is transmitted correctly
- Checksum
- Take the sum of the length of the binary data. If it is less then or equal to 255, this is the checksum. If it is greater than 255:
- Divide the sum (X) by 255
- Round it to the nearest whole number, A
- B = 256 * A
- Calculate X - B
- 4 is the checksum
How can you decide if a solution is effective?
These criteria can be applied when determining the effectiveness of a solution:
- Does it carry out its function?
- How quickly does it carry out its function? - The faster, the better.
- Are there any risks associated with applying this solutions, for example security threats?