Another look in Inheritance
We touched a bit on Inheritance concept. Inheritance is sometimes used to add functions to a class as a way of reuse for a new purpose.
We touched a bit on Inheritance concept. Inheritance is sometimes used to add functions to a class as a way of reuse for a new purpose.
One of the Object Oriented Programming concept is the ability of polymorphism. The word, polymorphism is an ancient Greek term. It means many forms. In progr...
What is upcasting?
An abstract class is like an ordinary class except one or more functions or properties is incomplete - ie. a function without implementation or a property wi...
A constructor is a special function that creates a new object. Using var or val in the parameter list makes them accessible from outside the object.
Inheritance is a mechanism for creating a new class by reusing and modifying an existing class.
What is recursion?
fold() combines all elements of a list, in order to generate a single result. Here is how we can use fold() to calculate the sum -