Adsense ads

Concept of OOP

Concept of OOP

Object Oriented Programming (OOP) represents an attempt to make programs more closely model the way people think about and deal with the world. In the older styles of programming, a programmer who is faced with some problem must identify a computing task that needs to be performed in order to solve the problem. OOP approach was invented to overcome the drawbacks of structural programming approach and procedural oriented programming (POP). OOP is the most recent concept in computer programming. Unlike structural programming approach, it uses the bottom-up programming approach. OOP treats data as a critical (very important) element in the program development and does not allow data to move freely around the program. OOP ties the data more closely to the function that operates on it and protects data from accidental modification from outside function. OOP allows decomposition of a program into a number of entities called object and then builds data and functions around these objects. The data of an object can be accessed only by the function associated with that function. However, the function of one object can access the functions of another object.

Some features of OOP

Emphasis is on data rather than procedures.
Programs are divided into object and modules.
Function that operate on the data of an object are tied together in the data structure.
Data is hidden inside the object and cannot be accessed by external functions.
Object may communicate with each other through function.
New data and functions can be easily added whenever necessary.
Follows bottom-up approach in program design.

Benefits of OOPs over Procedural Oriented Programming (POP) are follows:
OOP offers several benefits to both the programmer and the user. The new technology provides greater programming productivity, better quality of software and lesser maintenance cost. The main advantages of OOP are as follows:
Eliminate redundancy: Through inheritance, we can eliminate redundant code and extend the use of existing code. Allows Building Secure Program: Data hiding principle helps programmer to build secure programs that cannot be accessed by code in other parts of the program.

Ease in division of job: Since it is possible to map objects of the problem domain to those object in the program, the work can be easily partitioned based on objects. It is easy to partition the work in a project based on objects Provide extensibility: Object oriented systems can be easily upgraded from small to large system. Reduce complexity: Software complexity can be easily managed. Save development time and increase productivity: Instead of writing code from scratch, solutions can be built by using standard working modules. Allows designing simpler interfaces: Message passing techniques between objects allows making simpler interface descriptions with external systems. Features of OOP

Object
Object is the basic run time entities in an object-oriented program which consists of data and functions. They may represent a person, a place, a bank account, a table of data or any item That the program has to handle. It may also represent user-defined data. Programming problem is analyzed in terms of object. The program object are similar to the real world objects. Objects in program occupy some space in the memory and have an associated memory address like a structure in C. Hence, an object is a variable consisting both routine and data that is treated as discrete entity within programming. Each object contains data and functions to manipulate the data. The different objects can interact by sending message through function to one another. Class: Student Roll No. Name Grade Function: admit() pay_fee() give_exam() take_class()

Post a Comment

0 Comments