2.1.1 - The nature of abstraction Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is abstraction?

A

Process of removing unnecessary details to simplify a representation

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

Name three examples of abstraction

A

London Underground maps
Building plans
Video game
programming languages

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

How was abstraction applied to modern-day high-level programming languages?

A

First generation = Programming first started with machine code - 1s and 0s. Tedious and time-consuming.
Second generation = assembly language / mnemonic codes. Complex task and has to be re-written for each piece of hardware.
Third generation = High-level languages such as FORTRAN or BASIC. EG. X = A + 5. Programmers didn’t have to worry about memory allocation etc.

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

What is abstraction by generalisation?

A

Abstraction by generalisation is a grouping by common characteristics to arrive at a hierarchical relationship of the “is kind of” type.

For example:

  1. Object-oriented programming - Animal class has certain attributes that a dog class will inherit - therefore meaning a dog ‘is a kind of’ animal.
  2. Leonhard Euler - broke down the Konigsberg bridge problem into a problem that ‘is a kind of’ graph theory.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is data abstraction?

A

The details of how some data is represented are hidden.
For example:
When programming the programmer is not bothered by how the integer data type is represented within the computer.

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

Explain abstract data types

A

Queues; stacks; graphs and trees are all abstract data types.
They have a complicated structure however the programmer is only interested in the functions (AddToQueue etc) of these data structures. They do not need to know how the data structure is implemented, for example, an array with pointers to the front and rear of a queue.

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