Monday, November 28, 2011

Explain different properties of Object Oriented Systems.

An object oriented system revolves around a Class and objects. A class is used to describe characteristics of any entity of the real world. An object is a pattern of the class. An actual object created at runtime is called as an instance. A class, apart from characteristics has some functions to perform called as methods. For.e.g A class named "Food" has attributes like 'price', 'quantity'. "Food" class has methods like Serve_food(), bill_food().

•Objects in Object Oriented Systems interact through messages.
Inheritance:- The main class or the root class is called as a Base Class. Any class which is expected to have ALL properties of the base class along with its own is called as a Derived class. The process of deriving such a class is Derived class. For the "Food" class, a Derived class can be "Class Chinesefood".
Abstraction:- Abstraction is creating models or classes of some broad concept. Abstraction can be achieved through Inheritance or even Composition.
Encapsulation:- Encapsulation is a collection of functions of a class and object. The "Food" class is an encapsulated form. It is achieved by specifying which class can use which members (private, public, protected) of an object.
Polymorphism:- Polymorphism means existing in different forms. Inheritance is an example of Polymorphism. A base class exists in different forms as derived classes. Operator overloading is an example of Polymorphism in which an operator can be applied in different situations.

No comments:

Post a Comment