Introduction To C
Introduction To C
Object Class Data Abstraction & Encapsulation Inheritance Polymorphism Dynamic Binding Message Passing
Objects
Object is the basic unit of object-oriented programming. Objects are identified by its unique name. An object represents a particular instance of a class. There can be more than one instance of an object. Each instance of an object can hold its own relevant data. An Object is a collection of data members and associated member functions also known as methods.
Class
Classes are data types based on which objects are created. Objects with similar properties and methods are grouped together to form a Class. Thus a Class represents a set of individual objects.
Inheritance
Inheritance is the process of forming a new class from an existing class or base class. The base class is also known as parent class or super class, the new class that is formed is called derived class. Derived class is also known as a child class or sub class.
Raj
Rani
Roshan
Derived Class
INHERITANCE
SINGLE INHERITANCE
MULTIPLE INHERITANCE
MULTILEVEL INHERITANCE
HIERARCHICAL INHERITANCE
HYBRID INHERITANCE
When a subclass inherit only from one base class,it is known as single inheritance. Super Class (Base Class)
Super Class
Derived Class
Syntax:
Class Derived-class : Mode base-class { St1; St2; }; Mode is either private or public.By
default mode is private
Syntax:
Class Derived-class : Mode base-class1,Mode base-class2
{
St1; St2; };
Mode is either private or public.By default mode is private
Super Class
Sub Class 1 Sub Class 2 When a subclass inherits from a class that itself inherits from another class it is known as multilevel inheritance.Slide 6
When one subclass inheriting from many base class ,it is known as hierarchical inheritance.Syntax:
polymorphism
Poly a Greek term ability to take more than one form. Overloading is one type of Polymorphism. It allows an object to have different meanings, depending on its context.
Dynamic binding
It contains a concept of Inheritance and Polymorphism
Message Passing
It refers to that establishing communication between one place to another.