Objects

Structured programming only deals with procedures (functions) and variables. The basic idea behind the Object Oriented Programming is that it deals with the objects. In real life everything is an object and every object has properties and functionality.

As everything in the computer world is derived from the real life, like online books resemble with orignal hard binded books, the computer screen has more width than height as when we open a book its width is more than its height. So ther was a need to make the computer programs more near to the reality. Object Oriented Programming is muach nearer to the real world. In the reality everything
is an object, it has some properties and do some functionality, inherits some functionality from others etc…

What is an Object?

Objects are the basic run-time entities in an Object Oriented System. They may represent a person, a place, a bank account, a table of data or any item that the program must handle. They may also represent user defined data such as vectors, time and lists.

Programming problem is analysed in terms of objects and the nature of communication between them. Program objects should be chosen such that they match closely with the real-world objects.

When a program is executed, the objects interact by sending massage to one another. For example, if “customer” and “account” are two objects in a program, then the customer object may send a message to the account object requesting for the bank balance, Each object contains data and code to manipulate the data. Object can interact without having to know details of each other?s data or code. It is sufficient to know the ” of massage accepted and the type of response returned by the objects.

Example of an Object

Lets take the example of vehicle and mae an its object and use it to print the properties of that object..

Objects

Objects are the basic run-time entities in an object-oriented system. They may represent a person, a place, a bank account, a table of data or any item that the program must handle. They may also represent user defined data such as vectors, time and lists. Programming problem is analysed in terms of objects and the nature of communication between them. Program objects should be chosen such that they match closely with the real-world objects. When a program is executed, the objects interact by sending massage to one another. For example, if “customer” and “account” are two objects in a program, then the customer object may send a message to the account object requesting for the bank balance, Each object contains data and code to manipulate the data. Object can interact without having to know details of each other?s data or code. It is sufficient to know the ” of massage accepted and the type of response returned by the objects.

Leave a Reply