This document provides an overview of object-oriented programming concepts, including objects, classes, data abstraction and encapsulation, inheritance, and polymorphism. It defines key terms like class, object, inheritance and polymorphism. For example, it states that a class is a blueprint for creating objects, and that inheritance allows code reuse by extending a parent class. The document also gives examples and different types of each concept to help explain them at a high level.
Human Factors of XR: Using Human Factors to Design XR Systems
Concepts of oop1
1. CONCEPTS OF
Presented By:
Sheetal Pareek
B.Sc. IT, 4th sem
Presented To:
Dr. Rajeshwari Trivedi
Coordinator B.Sc. IT
Dev Sanskriti Vishwavidyalaya
2. Topics To Be Discussed...
Introduction to OOP
Object
Class
Data Abstraction and Encapsulation
Inheritance
Polymorphism
3. Introduction to OOP
It is a 'Programming Concept' that work on the principle that Objects are
most important part of your program.
Programming problem is analyzed in terms of objects.
Four main principles of OOP:
1).Encapsulation
2).Abstraction
3).Inheritance
4).Polymorphism.
Java, Python, Ruby, C++,Visual Basic are the some OOP Languages.
4. OBJECT
• Objects are the basic run time entities in an object oriented system.
• can be defined as an instance of a class (can be multiple instances of a class in a
program).
• contains both the data and the function(method), which operates on the data.
Example: A dog has states(Data) - color, name, breed
as well as behaviors(Functions) – wagging the tail, barking, eating.
5. CLASS
• An User-Define Data Type.
• A "Blueprint of Object", or an Extensible program-code-template for
creating objects.
• It is only an logical component and not the physical entity.
• Each class should be designed and programmed to accomplish one, and
only one, thing(data type).
• For example: in student class name, roll_no, marks are data members
and Total, Average, Display are the member function.
6. DATA ABSTRACTION AND ENCAPSULATION
Abstraction is an act of representing essential features without including background details.
Classes use the concept of abstraction.
Since the classes use the concept of data abstraction, they are known as Abstract Data
Types (ADT).
It is used to reduce complexity and increase Efficiency.
It is simply a case of hiding details about how a thing works.
The wrapping up of data and functions into a single unit (called c1ass) is known as Encapsulation.
The data is not accessible to the outside world, and only those functions which
are wrapped in the class can access it.
hide your data in order to make it safe from any modification.
7. INHERITENCE
⇢ Inheritance is the reuse of an existing code.
⇢ Inheritance is what is called when a parent class is used by a child
class for the purpose of extending the parent class.
⇢ By doing this we can save a lot of time and some unnecessary
programming.
8. TYPES OF INHERITANCE
1. Single Inheritance – Derived Class inherits only one base class.
2. Multiple Inheritance - a single derived class may inherit from two or more
than two base classes.
3. Hierarchical Inheritance -multiple derived classes inherits from a single base
class.
4. Multilevel Inheritance- derived class inherits from a class, which in turn
inherits from some other class. The Super class for one, is sub class for the other.
5. Hybrid Inheritance (also known as Virtual Inheritance)- derivation of a
class involves more than one form of any inheritance is called hybrid
inheritance.
9. POLYMORPHISM
• Polymorphism is derived from 2 greek words: poly and morphs.
Poly= many and Morphs= forms.
• briefly described as “one interface, many implementations”.
• Polymorphism is a characteristic of being able to assign a different
meaning or usage to something in different contexts.
• Increases Flexibility.
• There are two types of polymorphism:
(A).Compile time polymorphism (B).Run time polymorphism
10. REFERENCES
• The C++ Programming Language
- Bjarne Stroustrup
• Object Oriented Programming with C++
- E Balagurusamy