Mr Goff logo

Computer Science

Abstraction

A tricky long answer question to test your understanding of abstraction. Write out an ansnwer to each question and then click on the button to display the correct answer and mark your attempt.

Q1. Explain the diffent types of abstraction using examples. (8 marks)

Example answer

Abstraction refers to the process of removing uneceesary detail to make a problem easier to solve. There are a number of types of abstraction.

Representational abstraction is a representation of a problem arrived at by removing unnecessary details. The London Tube Map which omits things like above ground roads, and the actual exact route of the tracks is an example of this. Yet despite what is missing it can still be used to work out how to get from one part of London to another on the tube.

Abstraction by generalisation or categorisation is a grouping by common characteristics to arrive at a hierarchical relationship of the 'is a kind of' type. Plant and animal classification systems are a good example of this.

Information hiding is hiding all details of an object that do not contribute to its essential characteristics. Such as ignoring the colour of cars when making a survey of road usage.

Procedural abstraction is abstracting away the actual values used in any particular computation is a computational pattern or computational method – a procedure. This is seen when we pass parameters to a procedure.

Functional abstraction is where the particular computation method is hidden. Tis is like when we call math,sqrt() to get the square root of something.

Data abstraction is a methodology that enables us to isolate how a compound data object is used from the details of how it is constructed. For example, a stack could be implemented as an array and a pointer for top of stack.

Problem abstraction is where details are removed until the problem is represented in a way that is possible to solve because the problem reduces to one that hasalready been solved. An example of this is when we rearrange an equation to solve for a missing value.

1-2 marks: Types of abstraction are mentioned but not described.

3-4 marks: At 3 or more types of abstraction are described with no examples.

5-6 marks: 4 or more types of abstraction are described with up to 2 examples.

7-8 marks: At least 5 types of abstraction are described with 3-5 appropriate examples.


Computer Science Home