Abstraction Flashcards
What is abstraction?
Abstraction is picking out important details from a problem and ignoring the bits of information that aren’t useful.
Using abstraction, make a list of different things you would need to consider when watching a film at the cinema. Only include important details.
THINGS TO FOCUS ON: 1) What time and day the film is on. 2) Film genre and rating 3)Ratings of the film. 4) What cinema the film is being shown at. THINGS TO IGNORE: 1) Details about the plot and characters 2) Details about the actors and director 3) Films you aren't interested in seeing 4) The same film at any other cinema.
What are the advantages of abstraction? Why is it useful?
Abstraction is useful because it helps us get the idea of the algorithm by removing all the unnecessary bits. Also, without abstraction, you may end up with the wrong solution. You might think that a rule is specific for all algorithms, whereas it is relevant to only some.
Using abstraction, what would you need to include for someone to draw a cat from your instructions?
THINGS TO INCLUDE: 1)What it's face looks like 2)How much fur the cat has 3)How big the cat is 4)The shape of it's body THINGS TO IGNORE: 1)What food it likes 2)What sound it makes 3)How old the cat is 4)Whether the cat is male or female 5)Anything else not to do with what the cat looks like