Component 1 Flashcards
(114 cards)
Describe the disadvantages of using a procedural language to write a program. [4] p
-Difficult to maintain for large program
-Low reusability of code
-Poor representation of real-word entities
-Debugging and testing is more difficult
Identify two components that should be included in program
maintenance documentation, other than annotated listings and algorithms. [2]
Variable list
Data dictionary
Class diagram
List of sub routines
Entity Relationship Diagram
Describe the disadvantages of using an object-oriented paradigm. [2]
- OOP is difficult and not as ‘logical’ to some developers, it is complex to create application in.
- Software can become larger – more code - than procedural programs.
- OOP programs can run slower than PP as there is more code to execute.
- OOP cannot be used for all types of software application such as machine learning and AI.
- OOP can be difficult to debug.
Explain the nature of procedural languages [5]
Procedural languages are used in traditional programming based on algorithms or a logical step-by-step process for solving a problem
They obey (ordered) instructions
They carry out actions / calculations etc.
A procedural programming language provides the programmer a way to define precisely each step when performing a task
Allows tight control over the underlying operation of the hardware
Used in (large complicated) programs where similar operations may be carried out at varying stages of the program execution
Explain, giving a suitable example, translation error [3]
Translation errors occur during the compilation/interpretation of source code into machine code.
Translation errors include syntax errors and logical errors.
Syntax errors occur when there is incorrect syntax or spelling mistakes in the source code.
For example, in Python, forgetting to add a colon at the end of a function will cause a syntax error.
These errors can be mitigated using inbuilt IDE features such as autocomplete and linting.
Describe a queue data structure. [2]
A queue data structure operates on the first in first out principle (FIFO) or the last in last out (LILO) principle.
Data items are added at the end of the queue and removed from the front.
Explain how RIPA impacts on private data and what measures can be taken to protect this data. [3]
- Internet and communications companies such as internet service providers and mobile telecommunications providers retain customer browsing history for up to one year. This data can be accessed by a range of public bodies including British security services and the police, upon issue of a warrant.
- Allows the GCHQ, MI6 and MI5 to collect bulk personal datasets including NHS Health Records. When information is bulk collected, it will not only contain information on persons of interest but will also contain information on innocent members of the public.
- Allows the GCHQ, MI6 and MI5 to carry out equipment interference also known as ‘hacking’ personal digital devices upon issue of a warrant. These devices include personal computers and mobile phones. If there is encryption on the devices the service provider will have to comply in bypassing the device security to access any personal data.
Describe the purpose of MOD in algorithms. [2]
The MOD (modulo) operator is used to find the modulus when one number is divided by another.
The modulus is the integer remainder (right part of a decimal number) after division.
e.g. 9 MOD 2 = 1
Describe the types of software tools used to assist in version management. [2]
Program version management software is store, record and analyse different stages of code development.
Version of software can be submitted through a VCS (version control system) to an online repository hosting solution to track and record the changes in projects and files.
Version management software is useful when multiple developers are working on a single project, it ensures one develop does not overwrite another developers code.
Version management software can also be used to roll-back software if a program becomes corrupt during the development process.
Using examples describe the differences between translation and execution errors. [4]
Translation errors – usually identified by a compiler where the
instructions given cannot be translated to machine code due errors.
Syntax error
e.g. IF without ENDIF or punctuation error or spelling error if correct words given
Linking error
e.g. calling a standard function where the correct library has not been linked to the program
Semantic Error
e.g. Variable declared illegally
Runtime errors – Even though a program will compile and execute it could unexpectedly crash or produce incorrect results.
Logical error
e.g. division by 0 or use of incorrect logical/comparative operator
File handling e.g. When an attempt is made to write to a file that does not exist.
Explain how current legislation impacts on freedom of information. [4]
The FOIA gives individuals the right to request information from public authorities.
Public authorities include government departments, local authorities, and the National Health Service (NHS).
The FOIA sets out a process for requesting information, including a requirement for public authorities to respond within 20 working days.
There are exemptions to the FOIA, such as information that would threaten national security or breach someone’s privacy.
Failure to comply with FOIA can result in legal action and fines, and imprisonment for individuals who destroy or fail to disclose information.
Transparency and accountability of the act should increase the openness and accountability of government authorities
Information Commissioner’s Office (ICO) plays a crucial role in ensuring compliance, providing guidance and handling complaints.
Explain why a compiled program takes more time to debug than an interpreted one. [2]
Errors are reported after compilation has finished.
One error may cause many related/spurious errors
Recompiling after fixing an error adds time to the process.
Explain the characteristics of a hash table data structure. [4]
A hash table stores data using a key/value pair.
A hashing algorithm is used to generate a key to identify at which location the data can be stored.
The MOD operation is commonly used in a hashing algorithm to generate the key.
Data can be retrieved using the key to return the value.
If the hashing algorithm generates a key that is already present in the hash table problems can occur such as data collision.
One solution would be to use separate chaining where a linked list is used to store values of the same key.
Overall table linked list
Separate chaining could slow the down the overall retrieval of data.
Linear probing is another solution that could be used to store the data in the next available location and assign a new key.
A good hashing algorithm distributes keys uniformly across the hash table to avoid collision.
Describe two advantages of non-recursive sorting algorithms. [2]
Non-recursive algorithms are useful when a data structure is fixed in size like an array.
Non-recursion can reduce time complexity in sorting algorithms if implemented efficiently.
Non-recursive solutions require less memory than recursive solutions reducing the demand on resources.
Non-recursive solutions are easier to write.
Explain, giving a suitable example, execution error [3]
Execution errors occur when a program is running and cause unexpected results.
Execution errors include runtime errors and system errors.
Runtime errors occur when the program is running, and an unhandled exception occurs.
For example, if a program tries to divide a number by zero, it will crash or display an error message,
These errors can be mitigated using erroring handling such as try catch blocks and testing.
Describe pre-order traversal and give an example of how it could be used in a file system. [3]
Pre-order traversal is applied by visiting the root first, then left subtree and finally the right subtree. This method could be used to create a copy files in the file system.
Giving examples, explain the term data compression and describe how data compression algorithms are used. [6]
Data compression is reducing the amount of memory a file uses.
The level of file compression is measured using a compression ratio. A compression ratio is the size of the compressed file divided by the original file size.
Compression algorithms are used to employ different methods to reduce file size depending on the type of file.
There a two main types of file compression algorithms lossy and lossless.
Lossy compression algorithms reduce a file size but some data is lost during this process and cannot be retrieved.
Lossless compression algorithms reduce a files size without the loss of any data and the original file can be retrieved.
JPEG is a lossy compression method for images.
PNG is a lossless compression method for images.
Identify the main objectives of the optimisation process. [4]
Achieve the required output of the program.
Increase the speed of the program
Decrease demand on resources.
Not delay the overall compilation process.
Describe four procedures for backing up data giving reasons why they are used. [8]
External hard drive or memory sticks can be used to store back-up files through copying and pasting.
This method is useful of backing up small personal data such as documents and photos. Data can be overwritten with new backups.
CD / DVD can be used to store back-up files but are limited to the amount of space that is available. This method of back-up can be used for archiving data due to its read-only nature. Can be used for archiving files and documents.
Magnetic tapes can be used to store and routinely back-up network data. This method is used for backing up user network data and shared data including roaming profiles and intranet services.
A dedicated back-up server could be used to either mirror a main storage server or routinely back-up network data.
Cloud storage solutions can be used to routinely back-up data online and allows for synchronous version management of online files. This method for backup can be used to back up personal files that need to be access from many different devices.
Describe the use of alpha testing. [2]
Conducted in-house by developers and occurs before the customer agrees to accept the final program.
Alpha builds are not shared with either the end user or with the customer.
Alpha builds are not final piece of software and often include limited functionality and many bugs.
Explain the purpose of procedures in algorithms. [4]
Algorithms/programs can be broken down in to smaller parts.
These are named reusable pieces of code that can be called any number of times within an algorithm/program to perform a specific task.
Procedures are used to avoid the duplication of code.
Procedures are used to make an algorithm/program more efficient and secure.
Each procedure can be individually tested / debugged
Explain the need for a design review. [2] e
A design review checks that every element of the design meets the original specification
It ensures the requirements, performance, robustness, cost and usability are fully addressed
Describe the advantages of using a visual paradigm. [2] p
*It provides a graphical interface that is often more intuitive and easier to understand
*Allows rapid development by dragging and dropping components, speeding up prototyping
Describe the use of acceptance testing. [2]
Acceptance testing occurs is the final phase of testing during the software development life cycle.
Acceptance testing is undertaken by the actual end users of the system with real data.
The purpose of acceptance testing is to ensure the system has met the original requirements and specifications of the customer.