Maintainability Flashcards
Why are sub-programs used?
- Only need to be written once and then called whenever needed (reduces lines)
- Can be changed or tested without affecting the rest of the program
Why is indentation used?
- Makes code easier to read
- Makes the beginning and end of a loop clear
- Used to make the IDE understand that this is the start or end of a loop
Why are comments used?
- So if the programmer returns to his code, he knows what it was about
- For other programmers that read the code
Why is program maintenance necessary?
- Programs need to change to correct errors, modified to prevent errors in the future. Makes modifying programs easier
What are the four types of program maintenance?
- Corrective, preventive, adaptive and perfective. (PPAC)
What is naming convention?
- It is when the name of a variable or a function should match the task or thing that it does
What are the four different types of program maintenance?
- Naming convention
- Indentation
- Comments
- Sub-programs
What is destructive testing?
- Deliberately trying to break your program with data that the program wouldn’t expect.
What is iterative testing?
- Testing carried out on the modules to make sure the program works bit by bit. Testing is repeated until the code meets the desired outcome.
Why is iterative testing good?
By going through each section individually you can see which section has the error or if the section can work on its own.
What is terminal testing?
- Testing carried out at the end of the program to ensure that it works as a whole program and not just the modules you create.
What is modular testing?
- Same as iterative
What is the name of the test where you focus on what goes in and out of the program?
Black box testing
What is the name of the test that focuses on what happens inside the program?
White box testing