answersLogoWhite

0

What is public derivation in object-oriented programming?

Updated: 8/20/2019
User Avatar

Wiki User

11y ago

Best Answer

Public derivation or public inheritance means that all the public members of the base calls are declared public in the derived class while the protected members remain protected.

Protected inheritance means all the public members of the base class are declared protected in the derived class, as are the protected members.

Private inheritance means all the public and protected members of the base class are declared private in the derived class.

Private members of the base class are never inherited and are therefore unaffected by inheritance.

Note that regardless of the type of inheritance specified, individual non-private members of the base class can be inherited with public or protected access as required of the derived class. The type of inheritance can be therefore be thought of as being the default inheritance for all base class members which can (optionally) be overridden for specific members where required.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is public derivation in object-oriented programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Derivation programming language grammar.?

wht is the derivation of little


What does oop stand for?

OOP (Object Oriented Programming) is the implementation phase of OOD. OOD (Object Oriented Design) is a philosophy that considers things as objects that have attributes and methods. There can be public attributes and methods, and there can be private attributes and methods. The public interface is used to design the relationship between the object and its users, while the private interface is used to design the implementation of how that object works. If done correctly, the private implementation can be changed without requiring any change to the public interface or to its users. Often, a new object can be defined as a derivation of some other object, such as an officer is an employee. The derivation would add the necessary public and private aspects of an officer while inheriting the prior implementation of the public and private aspects of an employee.


Where can someone find information on Flash programming?

Information on flash programming can be found online at CNET, Flash Pro Lessons, Programming Guide and Pro Flash Programming. There are numerous books about flash programming; most of which can be obtained for free from a public library.


What is derivation of the name Rothschild?

One derivation is Schildroth


What is the derivation of x2?

Derivation of x2 or 2x is 2.


Derivation of pedal curve in cartesian coordinates?

derivation of pedal equation


What is the derivation of the formula of the surface area of a cuboid?

derivation of surface area of cuboid


What is a word for the derivation of a word from a name?

Eponymy is the derivation of a word from a name.


Write a program in java programming language to print welcome to java programming?

public class welcome { public static void main (String args[]) { System.out.println("Welcome to Java programming"); } } There are also many "Hello World" tutorials you can find elsewhere on the internet


What is the English derivation of 'hortus'?

horticulture, meaning gardening


Sample code in java programming?

public class Hello { public static void main (String args[]) { System.out.println("Hello World"); } }


Can you put the word derivation in a sentence?

The word derivative is a derivation of the root word derive. You may make a derivation of my original artwork under the creative commons license.