Basic Concepts of OOP - Supercoders | Web Development and Design | Tutorial for Java, PHP, HTML, Javascript Basic Concepts of OOP - Supercoders | Web Development and Design | Tutorial for Java, PHP, HTML, Javascript


Post Top Ad

Post Top Ad

Saturday, March 9, 2019

Basic Concepts of OOP

Basic Concepts of OOP

üObjects and classes
üData Encapsulation
üDynamic Binding
üMessage Communication

Objects and Classes

üProgram objects should be chosen such that they match closely with the real-world objects.
üAny programming problem is analyzed in terms of objects and the nature of communication between them.
üObjects contain data and code to manipulate that data.
üA class is a data type and an object is a variable of that data type.
üClass define the data and code that should be included in each object of that class.
üIt is a user defined type.

Data Encapsulation

üThe wrapping of data and methods into a single unit is known as encapsulation.

üThis ensures data hiding.
The methods of an object provides interface between the data of the object and the program.

üInheritance is the process by which objects of one class can acquire the properties of objects of another class.
It provides the idea of reusability.

üPolymorphism means the ability to take more than one form.
üA general class of operations may be accessed in the same manner even though specific actions associated with each operation may differ.
Dynamic Binding
üThe code associated with a procedure call is not known until the time of the call at runtime.
üIt is associated with polymorphism and inheritance.

Advantages of OOP

üThrough inheritance, we can eliminate redundant code and extend the use of existing classes.
üInheritance leads to saving of time and higher productivity.
üThe principle of data hiding produces more secure program.
üIt is possible to map objects in the problem domain to those objects in program.
üIt is easy to partition the work in a project based on object.
üSystem can easily be upgraded from small to large system.

üSoftware complexity can easily handled. 

No comments:

Post a Comment

Post Top Ad