Explalin concept of derivations in c++, C/C++ Programming

Assignment Help:

 derivations

1. Regardless of the type of derivation, private members are inherited by the derived class, but cannot be accessed by the new member function of the derived class, and certainly not by the instances of the derived class.

2. In a private derivation, the derived class inherits public and protected members as private. A new member's function can access these members, but instances of the derived class may not. Also any members of subsequently derived classes may not gain access to these members because of the first rule.

3. In public derivation, the derived class inherits public members as public, and protected as protected. a new member function of the derived class may access the public and protected members of the base class ,but instances of the derived class may access only the public members.

4. In a protected derivation, the derived class inherits public and protected members as protected .a new members function of the derived class may access the public and protected members of the base class, both instances of the derived class may access only the public members.

 


Related Discussions:- Explalin concept of derivations in c++

Define advantages of multi file program, Define Advantages of Multi File Pr...

Define Advantages of Multi File Program? The main merits of spreading a program across several files are: • Teams of programmers able to work on programs. Every programmer w

Program to track the hours an employee worked , Description: Create a...

Description: Create a program that allows the user to track the hours an employee worked in a week. How much the employee was paid and any extra hours worked (overtime pay).

Private member functions, P r i va t e Member Functions: A private...

P r i va t e Member Functions: A private member functions can be called by the members of the same class.  Consider the following example.   c l a ss sample

Described inline function?, A: The inline keyword tells the compiler to sub...

A: The inline keyword tells the compiler to substitute the code in the function de_nition for each instance of a function call. Though, substitution takes place only at the compile

Define commonly used built-in library functions, Define Commonly Used Built...

Define Commonly Used Built-in Library Functions? Comprise opened a file pointer you will desire to use it for either input or output. The C language supplies a set of functions

What is the real function of class - to export data, What is the real funct...

What is the real function of class - to export data? No, Real purpose of a class isn't to export data. Instead, it's to provide services. Class provides a way to abstract behav

Luminous jewels, Luminous Jewels - The Polishing Game Byteland county is v...

Luminous Jewels - The Polishing Game Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various lum

C pgms, find area under the curve y=f(x) between x=a &y=b integrate y=f(x)

find area under the curve y=f(x) between x=a &y=b integrate y=f(x)

C++ and matlab, ">http://www.ee.nmt.edu/~erives/289_F12/EE289_Takehome_2.p...

">http://www.ee.nmt.edu/~erives/289_F12/EE289_Takehome_2.pdf http://www.ee.nmt.edu/~erives/289_F12/Takehome2_maze.GIF

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd