what is data Abstraction? and give example

Answer Posted / abhay shukla

ata abstraction is a process of representing the essential
features without including implementation details.


example:
class result
{
int marks;
float percentage;
char name[20];
void input();
void output();
}

main()
{
bank b1;
b1.input();
b1.output();
}

in the above example, b1 is an object calling input and
output member functions, but that code is invisible to the
object b1

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Program to check whether a word is a sub-string or not of a string typed

1601


How do you find out if a linked-list has an end? (I.e. The list is not a cycle)

605


Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.

635


What is the difference between the indirection operator and the address of oper-ator?

614


There are 100 students in a class. The management keep information in two tables. Those two tables are given like Roll no Name Age 001 ABC 15 002 XYZ 14 and Roll No Subject Marks 001 Math 75 001 Physics 55 002 Math 68 001 Hindi 69 They want the information like this Roll No Name Hindi Physics Math Total 001 ABC 69 55 75 199 002 XYZ 68 74 84 226 And Roll No Suject Highest 001 Math 98 007 Physics 84 021 Hindi 74 All 275 All information is kept in structure in main memory. You have to find last two tables.

2535






Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes

591


What is buffer and example?

527


Define the operators that can be used with a pointer.

577


Which programming language should I learn first?

581


Which operations are permitted on pointers?

570


How do you define/declare constants in c++?

614


What are the advantages of using friend classes?

631


What is the most powerful coding language?

621


Explain the concept of friend function in c++?

608


How the programmer of a class should decide whether to declare member function or a friend function?

687