Top "Derived-class" questions

In Object Oriented languages, derived class can inherit properties and/or member functions from a base class, also called super class.

Can you override private functions defined in a base class?

I believe, a derived class can override only those functions which it inherited from the base class. Is my understanding …

c++ overriding derived-class base-class
Error : base class constructor must explicitly initialize parent class constructor

I am new to c++. When I try to compile the code below , I get this error constructor for 'child' …

c++ constructor initialization derived-class
how to get derived class name from base class

I have a base class Person and derived classes Manager and Employee. Now, what I would like to know is …

python plone derived-class base-class
Disabling inherited method on derived class

Is there any way to, in a Java derived class, "disable" a method and/or field that is otherwise inherited …

java derived-class
Pointer to array of base class, populate with derived class

If I have a base class, with only virtual methods and 2 derived classes from the base class, with those virtual …

c++ arrays inheritance pointers derived-class
Adding virtual removes the error : type 'base' is not a direct base of derived class

Conside the following sample code below: #include <iostream> using namespace std; class base { public: base() { cout << "…

c++ inheritance derived-class base-class
How do derived class constructors work in python?

I have the following base class: class NeuralNetworkBase: def __init__(self, numberOfInputs, numberOfHiddenNeurons, numberOfOutputs): self.inputLayer = numpy.zeros(shape = (numberOfInputs)) …

python constructor derived-class base-class
How to define sealed class in C++?

How to stop the class to be inherited by other class.

c++ class inheritance derived-class sealed
How to access protected method in base class from derived class?

Here is a sample of code that annoys me: class Base { protected: virtual void foo() = 0; }; class Derived : public Base { private: …

c++ protected derived-class