Mapa mental
OCR Computing - F452 - Programming techniques and logical methods (in progress)
Contenido del mapa
OCR Computing - F452 - Programming techniques and logical methods (in progress)
Interface design
- Order
- Layout
- Validation
- GUI objects
- Who is the user?
- Instructions
- Readability
- Types
- Modular
- Stepwise refinement
- RAD
- Rapid application development is: A method for designing software where a prototype design (with reduced functionality is produced) is tested and evaluated to refine the design of the next prototype. This is repeated (with a more refined prototype each time) until the prototype is accepted, meaning the final product can be produced.
- Advantages of using RAD: "Something" can be seen working early in the project, to be shown to the client (who will be actively involved to allow change of requirements as product becomes clearer) Overall development time is shorter (Than alternative methods)
- Good design
- Good interface design will make the program easier to use. (Describe question ) Making it easier to learn due to a familiar layout, good use of online help and will be intuitive. Fewer mistakes will be made when using the program. Input will be faster with the use of GUI objects such as drop down lists and option boxes, also any mistakes such as validation errors that are made will be alerted with dialogue boxes. There will be no information overload / sensitive to the needs of the user
- Examples
- When designing a GUI, important things to include are: A title, any details included in the question(name, surname ect) with the correct format + space to fill in the information, useful buttons (Save, close, clear data, a way to add more feilds) THIS IS ALL DEPENDANT ON THE GUI YOUR'E DESIGNING
Structure
- Definitions
- Statement
- A single instruction which can be executed. E.g. IF
- Subroutine
- Procedure
- Just executes with the given value
- Function
- Returns the value to the subroutine that gave it the value, so it can be used in expressions as a variable.
- Procedure
- Parameter
- Item of data that is passed to a subroutine and used as a variable in the subroutine.
- Sequence
- All instructions are executed in the order the occur and only once.
- Selection
- A condition is used to determine which (if any) statements are executed.
- Iteration
- Group of statements are repeated until a stopping condition is met
- Recursion
- When a subroutine (F and P) calls itself. it happens on the line before the END
- Statement
- 3 Basic constructs
- Sequence
- Selection
- Iteration
- Nesting constructs
- Data structures
- Array
- Record
- Definitions
Data types
- Numeric
- Real
- Integer
- Float
- Alphanumeric
- Character
- String
- Boolean
- Numeric
Files
- File types
- Serial
- Data is stored CHRONOLOGICALLY in the order it was entered. New data is always added/appended to the end of the file. You need to read each each item of data in the order it was entered to reach the item of data you are searching for
- Benefits of using a serial file (in comparison to a sequential): Files are relatively small/short. The program will usually need all of the data/ unlikely to search for individual fields in a record. There is no need to have the individual fields in an order
- Sequential
- Indexed
- Direct access
- Random
- Serial
- File size
- Handling
- Preparing
- Reading
- Writing
- Management
- File types
Facilities
- Operators
- Assignment
- Arithmetic
- Relational
- ==
- /= or <>
- <
- >
- <=
- >=
- Boolean
- Precedence
- String manipulation
- Concatenating
- Extracting parts
- Locating
- Find length
- Comparing
- ASCII
- Characters compared left to right using their ASCII values. UCASE come first. Characters with the lower code come first subsequent character only checked if the 2 characters compared are equal. GIVE EXAMPLES Some symbols have a lower value than letters.
- Cases
- UCASE("string") = STRING LCASE("STRING") = string
- Input/output
- Error handling
- Debugging
- Translator diagnostics will pick up syntax errors to inform the programmer to fix them.
- Break points allow the program to stop execution and check the values of variables
- Watches cause an execution to halt when a condition is met.
- Stepping is when the statements are executed one line at a time to see the path of execution and see the changed to the variables.
- Installation routine
- This is what the installation routine does: Copies program to a designated folder on the target computer, any necessary data files are copied, any necessary library files are copied and registered, shortcut icon created to run the program easily from, user given opportunity to configure program run settings (this configuration is saved in the registry files) Files may need to be extracted from a compressed file.
- Validation
- Input data is checked by a computer against a set of rules to ensure the data is suitable.
- Presence
- Has the data been entered?
- Length
- Is the data a suitable length?
- Character
- Are they in the correct case
- Format
- Does it consist of the correct data types? (characters and integers)
- Existence
- Is all of the data there?
- Operators
Good programming style
- Variables
- Scope
- Global
- Local
- Naming
- Giving variables meaningful names that are in context/more suitable to their task, make them easier to read as you wont need to remember what each variable name means.
- Initialising
- Variables are initialised to give it a starting value before it is used in an expression, or else it might retain the incorrect value.
- Incorrect initalising: It is incorrect to initialise as A + B = A because it would be read as a comparison, and will cause a syntax error if used as an algorithm.
- Scope
- Layout
- Indentation
- Allows readers to see the instructions being used.
- Modularised
- Indentation
- Format
- Commenting
- Benefits
- Benefits of good programming techniques are that: It enables a team to work collaboratively, meaning code can be split into modules (Easier to maintain/debug individually and that everyone understands the program (and other programmers can read it at a later date) Indentation shows structure, meaning identifiers make the code easier to read/understand. Less errors are made. Comments can be compared against logic of code, which will be easier to trace/debug, and even read in pseudocode.
- Variables
Testing
- Errors
- Syntax
- Using the incorrect operators which give an unwanted answer, usually the fault of the human
- Logic
- Errors done in calculations
- Run-time
- An infinite loop is created, meaning a value will be too big to be stored, causing a crash.
- Syntax
- Box
- Black
- SUITABLE inputs are tested against the expected output (according to the design of the program, but without consideration to how the program works)
- White
- Black
- Alpha
- Testing is done by the programmer(s)/ software company(playing the role of the client) This is done during development, to find bugs in the program.
- Beta
- Acceptance
- Program is tested to prove to the client/end user that he program works correctly and meets the original objectives. Done after development is complete but before the product is handed over to the end client / end user will pay if satisfied.
- Installation ans executing
- Errors
Useful functions/ Writing code
- Definitions
- Variable
- An item of data that can be given an identifier
- Can change during execution
- Parentheses
- Change order of calculation due to different operators having a different precedence.
- useful for user to read the order of the calculation
- In the paper, consider what is in the brackets could gain a mark.
- Constant
- defined at start. Can change but cant change during execution.Makes alogorithm more understandable.
- Variable
- ABS
- Gives +ve value of a -ve value
- Values given variables so can change
- Means only 1 thing needs changed, not every place it is used
- Write is simple psudo code when possible
- Declaring variables not needed
- Inputs
- Declaring values
- Correct construct
- print correct asked vales
- Correct construct
- Declaring values
- Definitions
Información
- Descripción
- Mapa Mental sobre OCR Computing - F452 - Programming techniques and logical methods (in progress), creado por nick5200 el 03/05/2015.
- Creado por
- nick5200
- Visitas
- 7
- Etiquetas
- Historial
-
- Creado por jacob gray · 3 may 2015
- Copiado por nick5200 · 3 may 2015
- Valoración