2.1.1 Flashcards

Thinking abstractly (8 cards)

1
Q

Abstraction

A
  • Removing unnecessary detail.
  • Representing the key elements of the problem.

-Must consider what information is actually
relevant to the problem at hand.

  • Complex problems can be split into several layers of abstraction.
  • Higher layers are closer to the user, possibly providing a user interface.
  • Lower levels interact with the computer.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The Need for Abstraction

A
  • Allows those who are not experts in a field to use systems by hiding more complex information which is irrelevant to using the system.
  • Allows more efficient design by encouraging focus on the core elements of a problem.
  • Reduces the time spent on a project.
  • Prevents a project becoming too large or complex.
  • Low-level programming languages directly interact with hardware but are hard to write so high-level languages abstract the machine code that is executed when a program is run.
  • The TCP/IP model is an example of abstraction in networking.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Abstraction and Reality

A
  • Abstraction is more simplified than reality.
  • Real world items are simplified into computer structures such as a table, variable or database.
  • Objects used in object oriented programming can be an abstraction of real world entities.
  • Attributes can represent the characteristics of a real world object.
  • Methods can represent the actions a real world object may perform.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Creating an Abstraction Model

A
  • What problem needs to be solved?
  • Who will use the model?
  • How will the model be used?
  • Which are the key elements of the problem for the people using the model and how they will use it?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Procedural Abstraction

A
  • Allows a programmer to use a function without understanding the detail of its implementation.
  • Used with data structures and in decomposition.
  • Models the purpose of a subroutine without considering how it does what it does.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Abstraction by Generalisation

A
  • Similar elements of a problem may be
    grouped together.
  • This allows common problems to be categorised.
  • They can then be solved with a common solution.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Procedural Abstraction

A
  • Allows a programmer to use a function without understanding the detail of its implementation.
  • Used with data structures and in decomposition.
  • Models the purpose of a subroutine without considering how it does what it does.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Data Abstraction

A
  • Programmers may use complex data structures without needing to understand how they are implemented in detail.
  • How data is being stored and filtered.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly