Programming Concepts Flashcards
What is the purpose of thinking ahead?
To make programs easy and intuitive for users to use.
Define inputs.
Any data that is required to solve a problem usually entered into the system by the user.
Define outputs.
The results that are passed back once the inputs have been processed and the problem solved.
What three considerations do programmers need to make about inputs and outputs when thinking ahead?
- Method of input/output device used
- Data structures used
- Data types used
- Order of data
Identify the inputs likely to be used in a book reservation system at a library.
- Book details: name author ISBN
- Borrower details: name library card number
Identify the outputs likely to be used in a book reservation system at a library.
- Expected waiting time
- Confirmation
- Availability at other libraries
- Collection point
What are preconditions?
Requirements which must be met before a program can be executed.
Where can preconditions be defined?
Within the code or within documentation.