A level Flashcards

1
Q

Describe Procedural Programming.

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe Object orientated programming.

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe Declarative programming.

A

A statement describing the problem is written and the language implementation describes the best way to solve it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe functional programming.

A

Functions are used to solve a problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a class?

A

A class is a template for a set of objects which have a state and behaviour.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an object?

A

An instance of a class.

  • A real world entity
  • Holds attributes and methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an attribute?

A

An attribute describes an individual data item within an entity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a method?

A

A method is a procedure associated with the object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is inheritance?

A

The ability for a class to be able to inherit properties and methods of another class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is encapsulation?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the advantages of OOP?

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Immediate Addressing?

A

The actual value to be loaded into accumulator (operated on).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Direct Addressing?

A

The memory address of the value to be operated on is held.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Indirect Addressing?

A

The address of the address of the data is held.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is Index Addressing?

A

The value of index register and register indexed added together to give location of value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What happens during Lexical analysis?

A
  • White space and comments removed

- Tokens of reserved words, constants, operators and variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What happens during syntax analysis?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What happens during Code generation?

A
  • High level instruction converted into machine code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What happens during Code optimisation?

A

Machine code generated is optimised to make more efficient.

20
Q

What does a linker do?

A

It is a computer program that links together more then one object code into a single executable file.

21
Q

What does a loader do?

A

Loads machine code into correct location in main memory.

22
Q

What are library programs?

A
  • Pre-written standardised programs available for immediate use.
  • Maths functions
23
Q

What is an assembler and what are the advantages and disadvantages of them?

A

Translates low level language into machine code.

Advantage
- Has one-to-one relationship with machine code

Disadvantage
- Complicated to write.

24
Q

What is an Compiler and what are the advantages and disadvantages of them?

A

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.

25
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.
26
What is a GPU?
GPU is a co-processer with many cores that carries out parallel processing and processes graphics.
27
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.
28
What is a white box test?
Dependent on code logic Structural testing Tests all possible logical paths Can not detect missing functions.
29
What is Alpha testing?
Testing carried out by developers to reveal errors in code
30
What is Beta testing?
Small group test product and give feedback of errors to be modified for future release.
31
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
32
Explain the Spiral model.
ADIE iterative Each loop generates prototype
33
Explain the Agile model.
ADIE iterative Not linear Keeping model simple Rapid feedback from user Understanding user requirements may change Incremental changes
34
Advantage of agile and spiral?
Acknowledge that the user doesn't always know what is possible and constant prototypes produced.
35
Explain Extreme Programming model.
Rapid development cycles producing constant releases of software that constantly changes in response to user feedback.
36
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
37
Advantage and disadvantage of XP and RD?
+ Good for large projects - Runs risk of being sidetracked and never finishing
38
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
39
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
40
What is the requirements to reach 3NF?
- No non-key dependencies | - Remove columns of data not entirely dependent on primary key to new table
41
Advantage of normalisation?
- No data redundancy - Data integrity - Better sorting and searching of data
42
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.
43
What does a Domain Name Server do?
Translates domain names into their unique IP addresses.
44
What is packet filtering?
Firewall filters packets by checking source.
45
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.