A level Flashcards
Describe Procedural Programming.
- Specific step-by-step code written telling computer what to do with an input.
- Used commonly in educational environments
- Code is easy to follow
- Structural programming is an example and uses concepts such as recursion, iteration, sequence and selection.
- Built-in data types (int, float, real)
- Typically has a data structure but the use of the DB needs to be coded therefore OOP better
Describe Object orientated programming.
- Uses class which what the data look like and how it should behave.
- Data items called objects
- Abstracts details of implementation away from programmer
- Makes code reusable
- Uses inheritance and polymorphism
Describe Declarative programming.
A statement describing the problem is written and the language implementation describes the best way to solve it.
Describe functional programming.
Functions are used to solve a problem.
What is a class?
A class is a template for a set of objects which have a state and behaviour.
What is an object?
An instance of a class.
- A real world entity
- Holds attributes and methods
What is an attribute?
An attribute describes an individual data item within an entity.
What is a method?
A method is a procedure associated with the object.
What is inheritance?
The ability for a class to be able to inherit properties and methods of another class.
What is encapsulation?
Attributes of an object can only be accessed using class methods.
This ensures that when a class is coded and tested it will not be a cause for future problems.
What are the advantages of OOP?
- Requires extensive planning ensuring better design and fewer weaknesses.
- Encapsulation allows independent testing of source code of object.
- Methods of object do not need to be understood to be used. (Polymorphism)
- New objects can be easily created
- Reusability
- Libraries of code available
- Easier to maintain.
What is Immediate Addressing?
The actual value to be loaded into accumulator (operated on).
What is Direct Addressing?
The memory address of the value to be operated on is held.
What is Indirect Addressing?
The address of the address of the data is held.
What is Index Addressing?
The value of index register and register indexed added together to give location of value.
What happens during Lexical analysis?
- White space and comments removed
- Tokens of reserved words, constants, operators and variables.
What happens during syntax analysis?
- Tokens are put together to check that valid sentence is formed
- Dictionary of variables generated containing location of variables
- Identifiers checked against a set of rules
- Semantic analysis (logical errors)
- Produces abstract binary syntax tree
What happens during Code generation?
- High level instruction converted into machine code
What happens during Code optimisation?
Machine code generated is optimised to make more efficient.
What does a linker do?
It is a computer program that links together more then one object code into a single executable file.
What does a loader do?
Loads machine code into correct location in main memory.
What are library programs?
- Pre-written standardised programs available for immediate use.
- Maths functions
What is an assembler and what are the advantages and disadvantages of them?
Translates low level language into machine code.
Advantage
- Has one-to-one relationship with machine code
Disadvantage
- Complicated to write.
What is an Compiler and what are the advantages and disadvantages of them?
Converts source code into object code which can be converted to match target computer.
Advantage:
- Executable file produced without need for source code making it more secure as source code not revealed.
Disadvantage:
- Errors need to be corrected before compiling and can take up a lot of time.
What is an Interpreter and what are the advantages and disadvantages of them?
- Source code executed directly line-by-line.
Advantage:
- Changes made do not cause time-consuming compilation process.
Disadvantage:
- Need to be loaded onto target computer to create machine code
- Takes longer then compiled program.
What is a GPU?
GPU is a co-processer with many cores that carries out parallel processing and processes graphics.
What is a black box test?
Carries out independently of the code used in program
Range of test values that cover all possible inputs and outputs to test functionality.
What is a white box test?
Dependent on code logic
Structural testing
Tests all possible logical paths
Can not detect missing functions.
What is Alpha testing?
Testing carried out by developers to reveal errors in code
What is Beta testing?
Small group test product and give feedback of errors to be modified for future release.
Explain the Waterfall lifecycle model.
ADIEM
User input at analysis very little until end.
One stage has to be finished in order to go onto next.
Sequential
+ small projects that need careful supervision
+ Progress easily measurable
+ Documentation at every stage
- Lack of customer involvement
- Excessive documentation
- System performance can not be tested until completion
Explain the Spiral model.
ADIE iterative
Each loop generates prototype
Explain the Agile model.
ADIE iterative
Not linear
Keeping model simple
Rapid feedback from user
Understanding user requirements may change
Incremental changes
Advantage of agile and spiral?
Acknowledge that the user doesn’t always know what is possible and constant prototypes produced.
Explain Extreme Programming model.
Rapid development cycles producing constant releases of software that constantly changes in response to user feedback.
Explain the Rapid Development model.
1) Workshop or focus group to gain user requirements
2) Prototype created with user feedback
3) Time limit for each part of system
4) Reusing of components
Advantage and disadvantage of XP and RD?
+ Good for large projects
- Runs risk of being sidetracked and never finishing
What is the requirements to reach 1NF?
- No repeated columns of data
- Identify columns which can be used to create a primary key
- Identify columns that can be used to create a relation table
What is the requirements to reach 2NF?
- Achieve 1NF
- No partial dependency
- No data set that occurs in multiple rows
- Move the datasets into new table and link them to existing ones
What is the requirements to reach 3NF?
- No non-key dependencies
- Remove columns of data not entirely dependent on primary key to new table
Advantage of normalisation?
- No data redundancy
- Data integrity
- Better sorting and searching of data
Explain ACID.
ATOMICITY - All or nothing approach either transaction is completed or not
Consistency - Database must move from one valid state to another
Isolation - Transactions must not affect each other
Durability - Once a transaction is completed the new database must be stored permanently.
What does a Domain Name Server do?
Translates domain names into their unique IP addresses.
What is packet filtering?
Firewall filters packets by checking source.
What is a proxy server?
Packets are sent to a proxy server before being sent to a private network to stop direct contact between website and user.