what is data Abstraction? and give example
Answer Posted / prakash
simply hiding implementation details and show what ever the
client programmer needs. there are two programmers in
devolopint the project Class Creators (who create new
datatypes) and client programmers (class consumers who use
data types in their applications).
It is helpful to break up the playing field into class
creaters and client programmers. The goal of the client
programmer is to collect a toolbox full of classes to use
for rapid application devolopment. The goal of the class
creator is to build a class that exposes only whats
necessary to the client programmers and keeps everything
else hidden. why because the client programmers cant use it
which means that the class creatior can change the hidden
portion at will without worrying about the impact to anyone
else. The hidden portion usually represents the tender
insides of an object that could easily be corrupted by a
careless or uninformed client programmer so hiding the
implementation reduces program bugs.
It is acheived in c++ through class boundaries (private
public and protected keywords...)
ex: class Light
{
private:
//data
public:
on();
off();
//.....
};
Light lt.on();
Is This Answer Correct ? | 63 Yes | 17 No |
Post New Answer View All Answers
What is ostream in c++?
Is the declaration of a class its interface or its implementation?
Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)
Is there any difference between int [] a and int a [] in c++?
What are c++ redistributables?
Explain the difference between static and dynamic binding of functions?
What are the c++ access specifiers?
What is general form of pure virtual function? Explain?
Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300
Declare a class vehicle and make it an abstract data type.
What is abstraction in c++?
What is iterator in c++?
What is the cout in c++?
If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?
How is static data member similar to a global variable?