0
I m not getting how to deal with private specifier? And what is role of set() nd get(
I m not getting how to extract name from class? Please help me to get thiss
3 Answers
+ 1
say, in class you have a private member that is string name.
in your class you also have two function, one that sets private member name and the other that returns it.
set_name(name) => take input and assign it to the private member.
get_name() => returns the private member name.
Then to extract the name you do: string name = object.get_name();
It makes sense?
+ 1
Yes ,that is right!
0
It means...get and set are necessary in program for extracting private data .am I right?