Chapter 48 - Thinking Ahead Flashcards
What does thinking ahead lets us establish? all of them
Things necessary before starting development of software.
What is an input?
information relevant and necessary for the problem to be solved.
What is an output?
Solution/results to the problem
What are the benefits of identifying inputs?
We can see where the information is coming from, the format it is in, how we can get it where we need it and how to use it for the most optimal solution.
What are the benefits of identifying outputs?
We are able to determine processing stages required to transform inputs into what we want.
What are the possible inputs to a touchscreen navigation system?
Coordinates
Destination
Settings
location (GPS does it automatically)
What are the possible outputs of a touchscreen navigation system?
Map
Directions
Audio
Time and route estimates
What does thinking ahead involve?
Identifying inputs
Identifying outputs
Caching
Identifying reusable program components
What is the concept of caching in thinking ahead?
Using it in order to speed up retrieval of information, it prepares data before it is needed
What is a precondition?
A condition that must be true or correct prior to execution of program/procedure/subprocedure
Why are preconditions added?
To ensure values are initialised correctly, so that program operation is correct and solution operates as expected
What are the advantages of having preconditions?
- The programmer/tester knows what checks must be made before a routine is entered where those conditions are used
- Helps to make code more reusable, so less coding required
- Easier to debug and maintain program
What is a program library?
series of predefined and compiled routines that are available for use in programs
Why do programmers and companies often use program libraries?
As it is impractical to start everything from scratch. Code will be simpler,easier and quicker to produce,easier to maintain,easier to read and understand.
Give some examples of program libraries
Windows DLL (dynamic link library) Python import modules C Library - using #include