4.1.17 Identify examples of abstraction.
4.1.18 Explain why abstraction is required in the derivation of computational solutions for a specified situation.
4.1.19 Construct an abstraction from a specified situation.
4.1.20 Distinguish between a real-world entity and its abstraction.
Abstraction A mental model that removes and hides complex details.
Abstraction leaves only the information necessary to accomplish a certain goal.
When we are dealing with a computer in one layer, we don't need to be thinking about the details of the other layers.
Example: When we are writing a program, we don't have to concern ourselves with how the hardware carries out the instructions.
Real-world application of abstraction (design and use):
"We don't need to know how a car works to drive one to the store. That is, we don't need to know how the engine works in detail. We need to know only some basics about how to interact with the car: how the pedals and knobs and steering wheel work. And we don't have to be thinking about all of those things at the same time."
Video created by University of Pennsylvania for the course "Computational Thinking for Problem Solving". Computational Thinking is an approach to solving problems using concepts and ideas from computer science.
A concept related to abstraction. A computer programmer often tries to eliminate the need or ability of one part of a program to access information located in another part.
This technique keeps the pieces of the program isolated from each other, which reduces errors and makes each piece easier to understand.
Abstraction focuses on the external view -- the way something behaves and the way we interact with it.
Information hiding is a design feature that gives rise to the abstractions that make something easier to work with.
1. Virtual machine is an example of abstraction that is particularly useful when testing software on different platforms.
Virtual machines provide a software emulation/virtualization of other operating systems;
While hiding/abstracting the physical environment/OS/execution environment of the host machine;
Virtual machines do not directly correspond to any real platform so software may be tested/executed on any platform (portability);
This is more practical/economical than having to test software on several computers with different OS;
The software to be tested is compiled into the language of the virtual machine, and this is interpreted into the language of the host machine;
2. Objects
An object hides the details;
Yet preserves the functionality;
OR
Objects combine abstractions of data and code;
While hiding away implementation of details;