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


Please Help Members By Posting Answers For Below Questions

Define stacks. Provide an example where they are useful.

755


Write is a binary search tree? Write an algo and tell complexity?

782


How do you traverse a btree in backward in-order?

806


What is an operator in c++?

789


How a new element can be added or pushed in a stack?

770






How does a copy constructor differs from an overloaded assignment operator?

762


What are the advantages of using typedef in a program?

825


What is a modifier in c++?

827


What is the sequence of destruction of local objects?

707


what are the characteristics of Class Members in C++?

788


If dog is a friend of boy, is boy a friend of dog?

759


Can we use this pointer in a class specific, operator-overloading function for new operator?

803


Write my own zero-argument manipulator that should work same as hex?

776


Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .

902


Write a program to find the reverse Fibonacci series starting from N.

796