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

What is constructor and destructor in c++?

615


How to get the current position of the file pointer?

552


What are protected members in c++?

617


Why c++ is so important?

602


What is the need of a destructor? Explain with the help of an example.

564






What do you mean by stack unwinding in c++?

725


What is the first name of c++?

563


Write a note about the virtual member function?

599


Describe new operator and delete operator?

623


Explain the register storage classes in c++.

667


How can an improvement in the quality of software be done by try/catch/throw?

587


Which field is used in c++?

631


Can a function take variable length arguments, if yes, how?

565


What is split a string in c++?

688


Is linux written in c or c++?

547