Department of Computer Science Bahria University, Karachi Campus
Department of Computer Science Bahria University, Karachi Campus
Inheritance:
In Object Oriented Programming (OOP) is the very basic and Important concept; Which means
the process when one class acquires the properties (methods and fields) of another. With the
use of inheritance, the information is made manageable in a hierarchical order.
The class which inherits the properties of other is known as subclass (derived class, child class)
and the class whose properties are inherited is known as superclass (base class, parent class).
Inheritance is also known as “Is-a” Relationship.
Sunday, May 13, 2018
Method Overloading:
When a Class (Type Object in Oracle) has multiple methods having same name but different in
parameters, it is known as Method Overloading. Methods overloading increases the readability
of the program. There are two ways to perform Method Overloading in OOP.
Method Overriding:
Method Overriding is performed when a method defined in a Parent Class, and is re-defined by
one of its Chilled Class with same signature.
Sunday, May 13, 2018
Abstraction:
It is the process where we show only “relevant” data and “hide” unnecessary details of an
object from the user. It’s also called as Method Hiding.
Sunday, May 13, 2018
Encapsulation:
Encapsulation is the process to hide the implementation details from users. If a data member is
private, it means it can only be accessed within the same class. No outside class can access
private data member of other class.
Sunday, May 13, 2018
Member Methods:
A method is procedure or function that is part of the object type definition, and that can
operate on the attributes of the type. Such methods are also called member methods, and they
take the keyword MEMBER when you specify them as a component of the object type.
Constructor Methods:
Every object type has a constructor method, a function with the same name as the object type
that initializes and returns a new instance of that object type. Oracle generates a default
constructor for every object type, with formal parameters that match the order, names, and
datatypes of the object attributes. We can define your own constructor methods.
Sunday, May 13, 2018
Static Methods:
Comparative Methods: