CodeSteps

Python, C, C++, C#, PowerShell, Android, Visual C++, Java ...

Inheritance

Ruby Programming – Inheritance in Ruby

Inheritance is one of the great feature in Object Oriented Programming. Ruby supports inheritance. Inheritance allows to inherit the features of the base classes to its derived classes. That means, through derived class objects we can access the features of the base class. Through this Article, we will discuss how we use Inheritance in Ruby. […]

C#: Classes – Access Specifiers & Inheritance

‘C#’ class members are accessible based on their access specifiers. I will write a separate article on class’s access specifiers in more detail. But here I want to give an high level introduction on access specifiers. Access Specifiers ‘C#’ provides public, private, internal, protected and protected internal access specifiers. Remember that the class members are […]

C++ – Inheritance – to extend class

Inheritance allows reusing the functionality. Inheritance inherits base class members to its derived class. We can use base class members within the derived class without rewriting the base class code. C++ allows single inheritance as well as multiple inheritances. In single inheritance, the derived class is inherited from a single base class. In multiple inheritances, […]

C++ – Class Constructors

In C++, class constructors are special kind of methods to instantiate a class. When the class’s object is going to create, C++ will first call the class’s constructor to initialize the class. Initializing the class means, assigning its members and allocating any dynamic memory, etc., After the class’s constructor is called, the class’s object creation […]

C++ – How to define virtual functions?

C++ is a Object Oriented language. C++ uses virtual keyword in different places. One of the use of virtual keyword is to create virtual functions. An important feature in Object Oriented programming is Polymorphism; which means multiple-behaviors. An object has multiple behaviors and it shows particular behavior depending on its context. C++ achieves this with […]

Scroll to top