This document summarizes key concepts of object-oriented programming including inheritance, encapsulation, polymorphism, and abstraction. It provides examples of each concept - inheritance allows classes to inherit properties from parent classes, encapsulation bundles data with methods that operate on the data, polymorphism allows the same message to be displayed in different forms, and abstraction reduces objects to their essential characteristics. The document was written by Shreya B for a computer programming project covering object-oriented programming topics.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
48 views8 pages
Shreya B Project
This document summarizes key concepts of object-oriented programming including inheritance, encapsulation, polymorphism, and abstraction. It provides examples of each concept - inheritance allows classes to inherit properties from parent classes, encapsulation bundles data with methods that operate on the data, polymorphism allows the same message to be displayed in different forms, and abstraction reduces objects to their essential characteristics. The document was written by Shreya B for a computer programming project covering object-oriented programming topics.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8
COMPUTER
PROGRAMMING PROJECT DONE BY: SHREYA B 8 ‘A’ Topics covered
• OBJECT ORIENTED PROGRAMMING (OOPS)
• INHERITANCE • ENCAPSULATION • POLYMORPHISM • ABSTRACTION OBJECT ORIENTED PROGRAMMING • Object Oriented programming (OOP) is a programming paradigm that relies on the concept of classes and objects. • It is used to structure a software program into simple, reusable pieces of code blueprints (usually called classes), which are used to create individual instances of objects. • There are many object-oriented programming languages including JavaScript, C++, Java, and Python. • There are four fundamental concepts of OOPS – Inheritance , Encapsulation, Polymorphism and Data abstraction. INHERITANCE • In object-oriented programming, inheritance is defined as deriving new classes from existing ones such as super class or base class and then forming them into a hierarchy of classes. Different kinds of objects often have a certain amount in common with each other. • The class whose properties and methods are inherited is known as the Parent class. • The class that inherits the properties from the parent class is the Child class. • Dogs, cats, and cow, for example, all share the characteristics of animals (tail , 4 legs , all are animals , etc.). Yet each also defines additional features that make them different: like dogs bark, cats says meow whereas cow moo. ENCAPSULATION • Encapsulation refers to the bundling of data with the methods that operate on that data. • Encapsulation is used to hide the values or state of a structured data object inside a class, preventing unauthorized parties to directly access them . Many programming languages use encapsulation frequently in the form of classes. • Encapsulation can be used to hide both data members and data functions or methods associated with an instantiated class or object. • Encapsulation may also refer to a mechanism of restricting the direct access to some components of an object, such that users cannot access state values for all of the variables of a particular object. POLYMORPHISM • Polymorphism is one of the most important concept of object oriented programming language. • The word polymorphism means having many forms. In simple words, polymorphism is defined as the ability of a message to be displayed in more than one form. • The most common use of polymorphism in object-oriented programming occurs when a parent class reference is used to refer to a child class object. • Real time example of polymorphism is water. Water can be in 3 states liquid, solid and gaseous. Its just 3 different forms like ice , vapors and water. They keep changing based on use and temperature. ABSTRACTION • Abstraction is defined as the process of reducing the object to its essence so that only the necessary characteristics are exposed to the users. • Abstraction defines an object in terms of its properties (attributes), behavior (methods), and interfaces (means of communicating with other objects). • Data Abstraction may also be defined as the process of identifying only the required characteristics of an object ignoring the irrelevant details. The properties and behaviors of an object differentiate it from other objects of similar type and also help in classifying/grouping the objects. • It helps in reducing programming complexity and efforts. It is one of the most important concepts of OOPs.