answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: When members of the same class or group marry?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How does a class in c plus plus enforce data encapsulation?

Data encapsulation is enforced by restricting access to the class members. Access can be specified on a per-member basis, defaulting to private access for a class and public access for a struct. Private members are accessible to class members and to friends of the class. Protected members are the same as private members but are also accessible to derived class members. Public members are fully-accessible. Data members are typically declared private while interfaces are typically declared public or protected.


When should a member of a class be declared public?

When the member needs to be accessible from outside of the class. Private members are only accessible from within the class itself, including friends of the class. Protected members are the same as private members but are also accessible to derived classes. Derived classes therefore inherit both the protected and public members of its base classes.


What do you mean by protected derivation of a sub class from base class?

When you derive a class (the sub-class) from a base class using protected access, all public members of the base class become protected members of the derived class, while protected members of the base class will remain protected. Private members are never inherited so they remain private to the base class. By contrast, if you use public inheritance, the public members of the base class remain public to the derived class, while protected members of the base class remain protected in the derived class. If you use private inheritance, both the public and protected members of the base class become private to the derived class. Note that accessibility cannot be increased, only reduced or left the same. That is, a protected member of a base class cannot be inherited as a public member of a derived class -- it can only be declared private or remain protected. Note also that accessibility is viewed from outside of the derived class. That is, all members of a base class other than the private members are inherited by the derived class and are therefore fully accessible to the derived class. But from outside of the derived class, all base class accessibility is determined by the access specified by the type of inheritance.


What are the privileges granted to friend function?

Friend functions (and classes) have private access to the classes that declare them as friends. Although they have the same access rights as members of the class itself, friends are not themselves members of the class and cannot be inherited.


Difference between private and protected specifier in c plus plus language?

In C++, the private specifier means that the item can only be accessed by methods of the class, not including methods of derived classes. Protected, on the other hand, means the item can be accessed by methods of the class, and methods of derived classes. Public, to complete the explanation, means that the item can be acessed by any method, this class, another class, or otherwise.

Related questions

What is the definition of the word peer?

A person of your class, of your group. It also means a member of the nobility in Britain (since they were all members of the same class or group).


Is group and class the same thing?

Yes a group and a class are the same thing.


Which level in the classification hierarchy phylum or class do members of a group have more characteristics in common?

Members of a group have more characteristics in common at the class level in the classification hierarchy. The class level is a more specific classification than the phylum level, so organisms within the same class share more similarities in terms of structure, behavior, and evolutionary history.


What is homogamy?

Homogamy means to marry someone similar, as when members of the same social class intermarry. It concentrate on social economic status and its to keep wealth in social stratification.


Can you marry a same blood group woman?

absolutely


Is denying same-sex couples the right to marry a violation of religious freedom?

It can be, if a religious group wants to unite members in matrimony, but is prevented from doing so by civil law.


Can man and women with same blood group can marry?

yes


If you marry a transsexual are you gay?

No. You are only gay if you are attracted to members of your same sex.


Members of a group that can interbreed and produce fertile offspring are in the same?

Members of a group that can interbreed and produce fertile offspring are in the same? it is known as a species


Do all members of the same ethinc group pratice the same religion?

No.


What is the meaning private member of a class?

It means the member is only accessible to the class itself, and to friends of the class. Protected members are the same as private members but are also accessible to derived classes. Public members are fully accessible.


This group is the same as a subordinate group A defining feature of this group is that its members have less control or power over their lives than do members of dominant groups?

sterotype