What do you mean by abstraction. Explain your answer?
Answer Posted / vishal parihar
In computer science, abstraction is the process by which
data and programs are defined with a representation similar
to its meaning (semantics), while hiding away the
implementation details. Abstraction tries to reduce and
factor out details so that the programmer can focus on a
few concepts at a time. A system can have several
abstraction layers whereby different meanings and amounts
of detail are exposed to the programmer. For example, low-
level abstraction layers expose details of the hardware
where the program is run, while high-level layers deal with
the business logic of the program.
The following English definition of abstraction helps to
understand how this term applies to computer science, IT
and objects:
abstraction - a concept or idea not associated with any
specific instance[1]
Abstraction captures only those details about an object
that are relevant to the current perspective. The concept
originated by analogy with abstraction in mathematics. The
mathematical technique of abstraction begins with
mathematical definitions, making it a more technical
approach than the general concept of abstraction in
philosophy. For example, in both computing and in
mathematics, numbers are concepts in the programming
languages, as founded in mathematics. Implementation
details depend on the hardware and software, but this is
not a restriction because the computing concept of number
is still based on the mathematical concept.
In computer programming, abstraction can apply to control
or to data: Control abstraction is the abstraction of
actions while data abstraction is that of data structures.
Control abstraction involves the use of subprograms and
related concepts control flows
Data abstraction allows handling data bits in meaningful
ways. For example, it is the basic motivation behind
datatype.
One can regard the notion of an object (from object-
oriented programming) as an attempt to combine abstractions
of data and code.
The same abstract definition can be used as a common
interface for a family of objects with different
implementations and behaviors but which share the same
meaning. The inheritance mechanism in object-oriented
programming can be used to define an abstract class as the
common interface.
The recommendation that programmers use abstractions
whenever suitable in order to avoid duplication (usually of
code) is known as the abstraction principle.
Is This Answer Correct ? | 11 Yes | 2 No |
Post New Answer View All Answers
What is setf in c++?
What is polymorphism in c++? Explain with an example?
Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?
What is guard code in c++?
Why do we use structure in c++?
How do you clear a set in c++?
What is the difference between structure and class?
What are the various compound assignment operators in c++?
What are the types of pointer?
What size is allocated to the union variable?
What are virtual functions in c++?
Is facebook written in c++?
Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.
Can we sort map in c++?
How many types of modularization are there in c++?