answersLogoWhite

0


Best Answer

Data abstraction is the means by which we lift the level of abstraction away from the machine (low-level) and closer to the application domain (high-level). As far as the machine is concerned, all data is binary, however the exact same binary representation can mean entirely different things within different contexts. Abstraction allows us to separate these contexts and thus give much greater meaning to the underlying representation.

User Avatar

Wiki User

6y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

10y ago

Data abstraction relates to the concept that it is not necessary to know how an object works in order to use it. Data abstraction allows class designers to alter the underlying storage and implementation of their classes without affecting the consumers of those classes. Thus exposure to those changes can be limited to within the class itself. This is achieved by exposing an abstract interface to the consumers: so long as that interface remains the same, the consumers will be completely unaware any changes have taken place.

Note that data abstraction is often confused with data hiding. You cannot hide data in C++, you can only limit access to it. Data hiding is actually a function of binary libraries and executables, where physical data can be obfuscated.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

Abstraction of data is a natural base for OOP. OOP deals with objects does not matter what kind of nature. In order to accomplish that, certain data should exist which could describe any other types in terms of its properties. Such data type is abstract data which can be any particular type.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Physical schemaDefines how data is storedConceptual schema or logical schemaDefines data in terms of a data modelExternal schema or view levelDefines a number of simplified domain-specific views

DBMS Levels of Abstraction
This answer is:
User Avatar

User Avatar

Wiki User

7y ago

All data at the machine level is represented in binary. In some cases that data may very well represent an actual binary value, but in most cases it does not; it is the binary representation of something else entirely. A person's name, a floating point number, a shape: these are all abstractions that computer operators are much more familiar with. Data abstraction is the means by which these abstractions become more apparent to the user.

If we consider 24-bit RGB colour values, the binary representation for each colour is a 24-bit binary value. However, that value has three separate components, red, blue and green, each of which is represented by an 8-bit value. In order to create a colour we need to adjust these components individually, so it makes sense to represent them as separate components. We might initially consider using a 3-byte array:

const char black[3] = {0x00, 0x00, 0x00};

const char white[3] = {0xFF, 0xFF, 0xFF};

const char blue[3] = {0x00, 0x00, 0xFF};

This would work, however there's very little abstraction here. There's nothing to tell us that a char[3] data type is supposed to represent a 24-bit RGB value but when we pass a char[3] array to a function any notion of abstraction is completely stripped away because all arrays decay to pointers:

void f (const char* colour) {

// ...

}

Aside from the formal variable name, colour, there's nothing to tell us what a colour pointer variable should actually be referring to. At first glance we might assume we can pass a null-terminated C-style string into this function. Worse, any function that uses colours also needs to make use of the "magic number" 3. This is far too low-level to be in any way useful. It will work, but the onus is entirely upon the programmer to make it work.

In order to raise the level of abstraction, we should use a data structure, not an array:

struct RGB {

char red;

char blue;

char green;

};

At the machine-level there is no fundamental difference between an RGB data type and a char[3] data type. They are exactly the same length (3 bytes) and therefore equally efficient, but an RGB data type is much more meaningful to the programmer:

const RGB black = {0x00, 0x00, 0x00};

const RGB white = {0xFF, 0xFF, 0xFF};

const RGB blue = {0x00, 0x00, 0xFF};

void f (RGB colour) {

// ...

}

This is still relatively low-level because the implementation details are wholly visible, however knowing what is being represented by a data type gives us a much better idea of how to actually use the data type.

In this case, the RGB members have no invariant (they don't acquire any resources that need to be manually released), so it doesn't make sense to declare the data members private; it's not going to raise the level of abstraction. However, it would make sense to add some operator overloads to make it a little easier to work with. Inserting an RGB colour value into an output stream would certainly make debugging a bit easier:

std::ostream& operator<< (std::ostream& os, const RGB& colour) {

os << "RGB{" << colour.red << ", " << colour.green << ", " << colour.blue << "}";

return os;

}

Inserting a colour into a data file can also be catered for:

std::ofstream& operator<< (std::ofstream& ofs, const RGB& colour) {

ofs << colour.red << colour.green << colour.blue; return ofs; }

Given these operators, any code that uses them becomes that little bit more abstract:

void f (const RGB& colour, std::ofstream& ofs) {

std::cout << "saving colour value: " << colour << std:endl;

ofs << colour; }

Here the implementation details are much less apparent. The first writes the representation in a human-readable form while the latter writes the representation in the machine-readable form. Given the constant colour blue, the two outputs from this function would be:

saving colour value: RGB{0, 0, 255}

0x0000FF

Do we really need to know the implementation details in order to use these operators? Of course not. The abstractions alone have made these operators much more intuitive and the more intuitive something is the more likely we are to use it. More importantly, we haven't sacrificed performance or memory in any way; data abstraction is a programming tool, nothing more. However, if we can also present the data abstraction to the end-user, then so much the better. The first operator overload achieves that. The second does not but then again it was never intended to; it was solely intended to make life easier for the programmer, not the end-user.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

Data abstraction refers to data hiding in OOPS . Data hiding is the hiding of data and and showing only the one you want to show . For example in a radio all wiring and system are covered by a plastic body .

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

Abstraction

Abstraction is simplifying complex reality by modelling classes appropriate to the problem, and working at the most appropriate level of inheritance for a given aspect of the problem.

For example, Lassie the Dog may be treated as a Dog much of the time, a Collie when necessary to access Collie-specific attributes or behaviors, and as an Animal (perhaps the parent class of Dog) when counting Timmy's pets.

Abstraction is also achieved through Composition. For example, a class Car would be made up of an Engine, Gearbox, Steering objects, and many more components. To build the Car class, one does not need to know how the different components work internally, but only how to interface with them, i.e., send messages to them, receive messages from them, and perhaps make the different objects composing the class interact with each other.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Data abstraction provides the skeleton or templates. That is it has no actual implementation.

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

hey whats up

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Explain what is meant by object-oriented concept of abstraction?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is meant by abstraction of proton?

abstraction of proton means removal of hydrogen because hydrogen leaves without its electrons so it is removed as a proton


How do you explain what is meant by a complex system?

Explain what is meant by a complex system


Explain what is meant by feedback in terms of acquiring skill?

Explain what is meant by feedback


What is meant by concept in architectural design?

meaning of design concept in architecture


What is meant by the term dementia?

Explain what is meant by the term 'dementia.'


In game of volleyball explain what is meant by a 5-1 setting system and explain why it could be successful?

explain what is meant by a 5-1 setting system and explain whyn it could be successful


Explain what is meant by the fetch-execute cycle and describe its action in RLT?

Explain what is meant by the fetch-execute cycle and describe its action in RLT?" Explain what is meant by the fetch-execute cycle and describe its action in RLT?"


What is meant by abstraction in c plus plus?

Abstraction is a process by which higher concepts are derived from the usage and classification of literal ("real" or "concrete") concepts, first principles and/or other abstractions.


What is meant by 3C concept?

Customer,Cost,Communication


Explain what is meant by ocp test .i am fresher in oracle.can you please explain about test pattern.give some material names?

explain what is meant by "embedded control character" employed by a word processing package.


For a series rlc resonant circuit explain what is meant by series resonance and what effect it has on a circuit?

What is meant by resonance and explain the series and parallel resonance? by kathiresan


What is meant by the 62nd harmonic and does it exist or is this a science-fiction concept?

Google it.