Application of Statistics in Daily Life Report

Only available on StudyMode
  • Download(s) : 215
  • Published : October 24, 2012
Open Document
Text Preview
Definition: Polymorphism is a generic term that means 'many shapes'. In C++ the simplest form of Polymorphism is overloading of functions, for instance several functions calledSortArray( arraytype ) where sortarray might be an array of ints, or doubles. With OOP, polymorphism takes place through inheritance.

It is the most important part of Object-Oriented Programming. Polymorphism is the core of object-oriented programming .C++ supports polymorphism by allowing member functions defined in classes to be overridden with member functions having the same names, but different implementations, in derived classes Definition:

Inheritance is the process of creating new classes from the existing class or classes. In C++ and C, classes can be defined as deriving from a base class. A derived class inherits all of the ancestors protected and public methods and data members. With inheritance if a method is made virtual in the base class then the derived class can override it with different behaviour. This makes possible polymorphism. Types of classes:

Definition: In C++ and C# OOP, a derived class is any class that inherits from any other derived class or base class. Definition: In C++ and C# OOP, the base class is the highest class and does not inherit from any other class. Other classes can inherit from a base class. They are called derived classes. Forms of Inheritance:

Single Inheritance: If a class is derived from a single base class, it is called as single inheritance. Multiple Inheritance: If a class is derived from more than one base class, it is known as multiple inheritance Multilevel Inheritance: The classes can also be derived from the classes that are already derived. This type of inheritance is called multilevel inheritance. Hierarchical Inheritance: If a number of classes are derived from a single base class, it is called as hierarchical inheritance

Definition of class:When you define a class, you define a blueprint for a data type. This doesn't...
tracking img