







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to Object-Oriented Programming (OOP), a programming language model based on objects and their interactions. the basics of classes, objects, interfaces, packages, constructors, and the features of OOP such as encapsulation, inheritance, polymorphism, and abstraction. Real-world examples are used to illustrate these concepts.
Typology: Slides
1 / 13
This page cannot be seen from the preview
Don't miss anything!








(^) Object oriented programming is a programming language model organized around objects rather than “actions” and data rather than logic,which may contain data , in the form of field , often knows as attributes , and code, in the form of procedures , often knows as method. Many of the most widely-used programming languages ( such as C++, Object Pascal, Java, Python etc.) are multi-paradigm programming languages that support object-oriented programming to a greater or lesser degree, typically in combination with imperative , procedural programming.
(^) Objects are key to understanding object-oriented technology. Look around right now and you'll find many examples of real-world objects: your dog, your desk, your television set, your bicycle.
(^) An interface is a description of the actions that an object can do... for example when you flip a light switch, the light goes on, you don't care how, just that it does. In Object Oriented Programming, an Interface is a description of all functions that an object must have in order to be an "X". Again, as an example, anything that "ACTS LIKE" a light, should have a turn_on() method and a turn_off() method. The purpose of interfaces is to allow the computer to enforce these properties and to know that an object of TYPE T (whatever the interface is ) must have functions called X,Y,Z, etc.
(^) A special function having the "same name" as the ClassName, with no return-type. (^) As the name implied, constructor is called each time when an instance is declared (or constructed). (^) Used for initializing the data members of the instances created.
(^) Is the mechanism of deriving new class from old one. (^) It generally consists of two or more classes. (^) Parent or base class are those classes which properties or method can be derived for child or derived class. (^) Child or derived class are those classes which derived the properties or method from the parent or base class with having added its own properties and method. (^) There are five types of inheritance and they are single, multiple, multilevel, hierarchical and hybrid. (^) The example child derived the blood group from parent and it can also had its own features like height. It height can be more or less.
(^) Ability to process objects differently as per their data types or class (^) Allows values of different data types to be handled in a uniform manner (^) Can perform polymorphism with the help of method overloading and overriding (^) Two types of polymorphism: compile time polymorphism and run time polymorphism