Objects
-> Object is the basic runtime entity in an object-oriented system.
-> It is an instance of a class.
-> It may represent a person, a place, a bank account, a table of data or any other item that the program has to handle.
-> They may also represent user defined data such as vectors, time, and lists.
-> Object is the variable of type class.
-> It is an instance of a class.
-> It may represent a person, a place, a bank account, a table of data or any other item that the program has to handle.
-> They may also represent user defined data such as vectors, time, and lists.
-> Object is the variable of type class.
Classes
-> Entire set of data and code of an object can be made a user defined data type with the help of a class.
-> Once a class has been defined, we can create any number of objects belonging to that class.
-> A class is thus collection of objects of similar type (Class).
-> Classes are user defined data types and behave like the built-in types of a programming language.
-> Once a class has been defined, we can create any number of objects belonging to that class.
-> A class is thus collection of objects of similar type (Class).
-> Classes are user defined data types and behave like the built-in types of a programming language.
Data Abstraction and Encapsulation
-> The wrapping up of data and functions into a single unit (class) is known as encapsulation.
-> Data is not accessible outside world and only those functions which are wrapped in the class can access it.
-> These functions provide interface between the object's data and the program.
-> This insulation of the data from direct access by the program is called data hiding or information hiding.
-> Data is not accessible outside world and only those functions which are wrapped in the class can access it.
-> These functions provide interface between the object's data and the program.
-> This insulation of the data from direct access by the program is called data hiding or information hiding.
-> Abstraction refers to the act of representing essential features without including the background details or explanations.
-> Classes use the concept of abstraction and are defined as a list of abstract attributes such as size, weight, etc and functions to operate on these attributes.
-> The attributes are sometimes called data members because they hold information. The functions that operate on these data are sometimes called methods or member functions.
-> Since the classes use the concept of abstraction they are known as Abstract Data Types (ADT).
-> Classes use the concept of abstraction and are defined as a list of abstract attributes such as size, weight, etc and functions to operate on these attributes.
-> The attributes are sometimes called data members because they hold information. The functions that operate on these data are sometimes called methods or member functions.
-> Since the classes use the concept of abstraction they are known as Abstract Data Types (ADT).
Inheritance
-> Inheritance is the process by which objects of one class acquire the properties of objects of another class.
-> In OOP, the concept of inheritance provides the idea of reusability.
-> This means that we can add additional features to an existing class without modifying it. This is possible by both the classes.
-> In OOP, the concept of inheritance provides the idea of reusability.
-> This means that we can add additional features to an existing class without modifying it. This is possible by both the classes.
Polymorphism
-> Polymorphism is another important OOP concept. The Greek term polymorphism means ability to take more than one form.
-> An operation may exhibit different behaviours in different instances.
-> The behaviour depends upon the types of data used in the operation.
-> The process of making an operator to exhibit different behaviours in different instances is known as operator overloading.
-> Using a single function name to perform different types of tasks is known as function overloading.
-> Polymorphism plays an important role in allowing object having different internal structures to share the same external interface.
-> An operation may exhibit different behaviours in different instances.
-> The behaviour depends upon the types of data used in the operation.
-> The process of making an operator to exhibit different behaviours in different instances is known as operator overloading.
-> Using a single function name to perform different types of tasks is known as function overloading.
-> Polymorphism plays an important role in allowing object having different internal structures to share the same external interface.
Dynamic Binding
-> Binding refers to the linking of a procedure code to the code to be executed in response to the call.
-> Dynamic binding means that the code associated with given procedure call is not known until the time of the call at runtime.
-> A function call associated with the polymorphic reference depends on the dynamic type of that reference.
-> Dynamic binding means that the code associated with given procedure call is not known until the time of the call at runtime.
-> A function call associated with the polymorphic reference depends on the dynamic type of that reference.
Message Passing
-> An object oriented program consists of a set of objects that communicate with each other.
-> The process of programming in an object oriented languages therefore involves the following basic steps:
-> The process of programming in an object oriented languages therefore involves the following basic steps:
1. creating classes that defined objects and their behaviour
2. creating objects from class definitions
3. Establishing communication among objects
2. creating objects from class definitions
3. Establishing communication among objects
-> Objects communicate with one another by sending and receiving information much the same way as people passes messages to one another.
Post a Comment