F452 Describe Flashcards
Describe what is meant by serial file.
Records appear in the order that they are received/chronologically. New records are appended to the end of the file. To access a record you have to search through all of the preceding records.
Describe RAD and the advantages.
Is a method for designing software where a prototype design with reduced functionality is produced then tested and evaluated to refine the design of the next prototype. This is repeated until the prototype is accepted which becomes the final product. Advantages: something can be physically ‘seen’ clearly working early in the project, overall development time is quicker and end user is more involved. User can change requirements as product becomes clearer.
Describe black box testing.
In black box testing, sets of inputs are tested…
… to see if they produce the intended outputs
… you need to test all possible types of input/situations
… but how the algorithm works is not considered
Describe alpha testing.
Testing is carried out by the programmers playing the role of the user during development to find bugs in the program.
Describe acceptance testing.
Takes place after the program is completed. Meeting between Client and End User. Client demonstrates to the end user that the software works corrects or requirements are met and desired features are implemented.
Describe two ways in which you can improve the readability/programming style of an algorithm.
Use indentation and use meaningful identifier names for a variable
Describe debugging tools and facilities available in programming languages, which can be used to identify and correct errors.
Translator diagnostics - picks up syntax errors and informs the programmer who can then correct the error and translate it again
Break points - causes the program to halt in execution at strategic points current values of variables can then be checked.
Watches - causes the program to halt in execution if a condition is met such as a variable changing.
Stepping- executing the code one statement at a time observing path of execution and changes to variables. can be used with break points or watches.
Describe how using constants can help improve the maintainability of coding.
A descriptive identifier/ name is used for the constant which makes the code clearer to read and understand during maintenance. and is is easier to remember the identifier than the value when writing code. if the value needs to be changed, then only one change needs to be made (where the constant is declared). this updates the value throughout the program.
Describe what is meant by a parameter.
A variable which holds an item of data which is supplied/passed to a subroutine/procedure/function. It is given an identifier when the sub-routine is defined. It is substituted for an actual value when the subroutine is called.
Describe two types of iteration construct.
While Loop - condition is tested before each iteration and the statements inside the loop will only be executed if the condition is TRUE. The statements inside loop may never be executed if the condition is initially false.
For Loop - the number of iteration is fixed according to start and end values of a variable set at the beginning.
Describe two advantages of using a modular design to produce software.
Each model is a small part of the problem so easy to solve, test and debug. Easy to maintain and update a part of the system since the program would be well structured with clearly defined interfaces. Development can be shared between a team of programmers so the program develops faster and easy to monitor progress. Modules can be allocated according to expertise improving the quality of final product. Different modules can be programmed in different languages. Modules can be reused in different programs.
Describe how a serial search is conducted.
Check the array is not empty and if it is report an error.
Set a counter to 0 or 1. Check if item in current position is item searched if found return the position/value of counter. If not found increment counter/move to next position…Until the end of the array or until the item is found. If not found then return ‘not found’.
Describe what nesting means.
When a construct is written within another. Each construct must be completely contained in the preceding construct.
Describe what is meant by keyword violation error.
A reserved word that cannot be used as an identifier. Words which are already used for a purpose within the language.
Describe what a recursive algorithm means.
When a function/procedure calls itself until is reaches a stopping condition.
Describe what beta testing means.
When a program is nearly completed and is tested by third party users under real conditions as intended. They report any errors found and suggest any features which can be implemented to improve the program.
Describe two ways that sound can be used to enhance an interface.
Speech synthesis e.g. to give members instructions.
Buzz/Beep/Click/ to reinforce on screen feedback or to signify transition completely successfully
Alarm-to alert staff/request assistance
Describe what a random file means.
The key address of each record is calculated from the key using a hash # algorithm. Records may not be in sequence.
Describe what is meant by a procedure.
A procedure is a subroutine which is given an identifier. It can be called from the main program/or from another procedure. When called the code in the procedure can be executed and then control is passed back to where the procedure is called from.
Describe how breakpoints and stepping can be used to identify errors in programs.
Breakpoints- will pause the code to stop at specified lines of code.
Stepping - allows programs to be executed a line at a time allowing the programmer to check the value of variables. Allows the programmer to see the flow of control e.g. to determine logic error/check results of calculations e.g. to determine at what point an error occurs. e.g to detect undeclared identifiers e.g. to determine why a runtime error has occurred.
Describe the advantage of using iteration instead of recursion.
Iteration uses only one set of variables therefore more efficient use of memory. Iteration can be faster and less likely to run out of stack space.
But algorithm with iteration may be more difficult to follow because variables are being reused. You need to ensure that the conditions of the loops are correct.
Describe what is meant by a logic error.
Code follows the rules/syntax of the language but does not perform the intended action. e.g. wrong mathematical operator
Describe what is meant by an array.
A data structure of the same data type grouped under one identifier/variable. Each item can be addressed using its index position.
Describe what happens if a programmer declares a global variable and a local variable with the same name.
If a global and local variable are declared with the same name either the translator the will create an error or the local variable will take precedence. The global will apply to the rest of the code whereas the local variable will only apply to the function/procedure.