Abstraction in its many forms is a fundamental
concept used in computational thinking and problem solving
Removing irrelevant details allows the computer
scientist to focus on the essence of a problem
Data abstraction is used to create and manipulate complex
data structures
Abstraction
is Representation of the real world but hiding certain details. The London underground maps is a good example of information hiding as the tracks are not
exact and neither is the location of the stations. It has removed unnecessary
details that would only create confusion.this is called information hiding.
Games are also abstract , they try to represent
certain aspects of the real world but also take out all the so many little
details that would make it so complicated (simplify it).E.g. raising children
in Sims would take maybe 5 steps which we know there is a lot more to do.
Problem
abstraction - removing details until the problem
reduces to one which has already been solved.
Automation
– in this context refers to building models of real work objects in order to
solve a particular problem Computer scientists have to decide what details are
relevant to the problem and discard everything else
Algorithms and data structures can then be
designed to solve the problem the algorithm is then implemented in program code
and executed
Google
moon abstractions
http://www.google.com/moon/
- shows abstraction
It is 2d representation of the moon and the moon
isn’t 2d therefore it has been abstracted as making it 3d would require too
much data
Landing sites have detailed imaging
surrounding them, while the rest of the moon has lower resolution images. The
lower resolution images have been 'abstracted'
Decomposition
• Procedural decomposition means breaking a problem into a number of
sub-problems, so that each sub-problem accomplishes an identifiable task
• The sub-problems may themselves be further subdivided
Composition is the opposite
·
combining procedures to form a
compound procedure
·
Combining data objects to form
compound data objects such as a tree or stack (which you will study next year)
Procedural abstraction is used to
keep the actual values used in a computation separate from the overall design
Functional
abstraction
• When you call a function to calculate a square root, or generate a
random number, for example, abstraction is taken one stage further
• Using a function does not require you to know anything about how the
computation is carried out
• You simply have to know how to call the function and what parameters to
pass
Data
Abstraction
The data or information that is
relevant to solving a problem may be in the form of an abstract data structure
such as an array, stack or queue
It could be implemented as an array
and a pointer to the top of the stack – items do not need to be actually
removed from the array or sorted within it
No comments:
Post a Comment