Procedural Vs Object Oriented Programming
Procedural Programming
Can be defined as a programming model which is derived from structured programming,
based upon the concept of calling procedure. In these models, a programmer uses procedures
or functions to perform a task.
Languages used in Procedural Programming: C , Pascal , Fortan etc.
Object Oriented Programming can be defined as a programming model which is based
upon the concept of objects. Objects contain data in the form of attributes and code in the
form of methods. OOP concept uses variables and methods as procedural programs do, but it
focuses on the objects that contain variables and methods
Languages used in Object Oriented Programming:
Java, C++, C#, Python , Ruby
09/08/2022 3
Object-Oriented Programming (OOP)
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.
It is a programming paradigm that structures a software program according to objects.
Simply put, it creates objects that contain functions and data. This paradigm relies
greatly on the concept of classes and objects.
The main aim of OOP is to bind together the data and the functions that operate on them so
that no other part of the code can access this data except that function.
09/08/2022 4
Object And Class
Class:A class is basically user-defined data types that act as a
template for creating objects of the identical type. It represents
the common properties and actions (functions) of an object.
Object: A real-world entity that has state and behavior. Here,
state represents properties and behavior represents actions and
functionality. For example, a person, chair, pen, table, etc
Object takes space in the memory but
class does not take any space in the
memory. Class does not exist physically
but an object exists physically.
09/08/2022 5
OOP Principles
Encapsulation: the attributes of an entity are enclosed in itself. In other words, encapsulation
is when an object (inside a class) keeps its state private and only exposes the selected
information.This principle requires the ability to define some fields as either private or public.
Abstraction: hide important information in order to reduce complexity. It is when the user
only interacts with specific object’s methods and/or attributes. By hiding complex details from
the user, abstraction consequently reduces complexity.
09/08/2022 6
OOP Principles
Inheritance: as the name indicates, an entity can inherit attributes from other entities. More
precisely, parent classes can extend their attributes and behaviors to child classes, which also
means that this principle supports reusability.
Polymorphism: entities can have more than one form. Hence the ‘poly’. In sum,
polymorphism is when objects are designed to share behaviors. By overriding
Basic Concepts of Object Oriented Programming using C++ShivamPathak318367
In this PPT, we have discussed basic concepts of object-oriented programming (OOPs) using C++.
First, we will know what is object-oriented programming then we will go through the 6 basic concepts of OOPs which are Class, Object, Polymorphism, Encapsulation, Inheritance, and Data Abstraction.
Thinking of getting a dog? Be aware that breeds like Pit Bulls, Rottweilers, and German Shepherds can be loyal and dangerous. Proper training and socialization are crucial to preventing aggressive behaviors. Ensure safety by understanding their needs and always supervising interactions. Stay safe, and enjoy your furry friends!
Procedural Vs Object Oriented Programming
Procedural Programming
Can be defined as a programming model which is derived from structured programming,
based upon the concept of calling procedure. In these models, a programmer uses procedures
or functions to perform a task.
Languages used in Procedural Programming: C , Pascal , Fortan etc.
Object Oriented Programming can be defined as a programming model which is based
upon the concept of objects. Objects contain data in the form of attributes and code in the
form of methods. OOP concept uses variables and methods as procedural programs do, but it
focuses on the objects that contain variables and methods
Languages used in Object Oriented Programming:
Java, C++, C#, Python , Ruby
09/08/2022 3
Object-Oriented Programming (OOP)
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.
It is a programming paradigm that structures a software program according to objects.
Simply put, it creates objects that contain functions and data. This paradigm relies
greatly on the concept of classes and objects.
The main aim of OOP is to bind together the data and the functions that operate on them so
that no other part of the code can access this data except that function.
09/08/2022 4
Object And Class
Class:A class is basically user-defined data types that act as a
template for creating objects of the identical type. It represents
the common properties and actions (functions) of an object.
Object: A real-world entity that has state and behavior. Here,
state represents properties and behavior represents actions and
functionality. For example, a person, chair, pen, table, etc
Object takes space in the memory but
class does not take any space in the
memory. Class does not exist physically
but an object exists physically.
09/08/2022 5
OOP Principles
Encapsulation: the attributes of an entity are enclosed in itself. In other words, encapsulation
is when an object (inside a class) keeps its state private and only exposes the selected
information.This principle requires the ability to define some fields as either private or public.
Abstraction: hide important information in order to reduce complexity. It is when the user
only interacts with specific object’s methods and/or attributes. By hiding complex details from
the user, abstraction consequently reduces complexity.
09/08/2022 6
OOP Principles
Inheritance: as the name indicates, an entity can inherit attributes from other entities. More
precisely, parent classes can extend their attributes and behaviors to child classes, which also
means that this principle supports reusability.
Polymorphism: entities can have more than one form. Hence the ‘poly’. In sum,
polymorphism is when objects are designed to share behaviors. By overriding
Basic Concepts of Object Oriented Programming using C++ShivamPathak318367
In this PPT, we have discussed basic concepts of object-oriented programming (OOPs) using C++.
First, we will know what is object-oriented programming then we will go through the 6 basic concepts of OOPs which are Class, Object, Polymorphism, Encapsulation, Inheritance, and Data Abstraction.
Thinking of getting a dog? Be aware that breeds like Pit Bulls, Rottweilers, and German Shepherds can be loyal and dangerous. Proper training and socialization are crucial to preventing aggressive behaviors. Ensure safety by understanding their needs and always supervising interactions. Stay safe, and enjoy your furry friends!
The simplified electron and muon model, Oscillating Spacetime: The Foundation...RitikBhardwaj56
Discover the Simplified Electron and Muon Model: A New Wave-Based Approach to Understanding Particles delves into a groundbreaking theory that presents electrons and muons as rotating soliton waves within oscillating spacetime. Geared towards students, researchers, and science buffs, this book breaks down complex ideas into simple explanations. It covers topics such as electron waves, temporal dynamics, and the implications of this model on particle physics. With clear illustrations and easy-to-follow explanations, readers will gain a new outlook on the universe's fundamental nature.
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
How to Add Chatter in the odoo 17 ERP ModuleCeline George
In Odoo, the chatter is like a chat tool that helps you work together on records. You can leave notes and track things, making it easier to talk with your team and partners. Inside chatter, all communication history, activity, and changes will be displayed.
2. 2
Agenda
o Object-Oriented Programming (OOP)
o Procedural programming
o Procedural programming vs OOP
o Features/Principles of OOP
o Advantages of using OOP
o Class
o Object
o Class vs Object
o Object Characteristics
3. Object-Oriented
Programming (OOP)
OOP is a programming paradigm based on the concept of "objects", which can
contain data and code. data in the form of fields, and code, in the form of
procedures.
A common feature of objects is that procedures are attached to them and can
access and modify the object's data fields
Note : The "Don't Repeat Yourself" (DRY) principle is about reducing the
repetition of code.
4. 4
Procedural programming is a programming paradigm
built around the idea that programs are sequences of
instructions to be executed.
Procedural
programming
5. PP vs 00P
Procedural programming Object-Oriented Programming
Divided into small parts called functions. Divided into small parts called objects.
follows a top-down approach. follows a bottom-up approach.
No access specifier
Has access specifiers like private, public, protected,
etc.
Does not have any proper way of hiding data so it
is less secure.
Provides data hiding so it is more secure.
overloading is not possible. Overloading is possible
there is no concept of data hiding and inheritance. the concept of data hiding and inheritance is used.
5
6. PP vs 00P
Procedural programming Object-Oriented Programming
the function is more important than the data. data is more important than function.
based on the unreal world. based on the real world.
Used for designing medium-sized programs.
Used for designing large and complex
programs.
uses the concept of procedure abstraction. uses the concept of data abstraction.
Code reusability absent Code reusability present
Examples: C, FORTRAN, Pascal, Basic, etc. Exemples: C++, Java, Python, C#,PHP etc.
6
8. Advantages of
using OOP
o OOPs is very helpful in solving very complex level of problems.
o Highly complex programs can be created, handled, and maintained easily
using object-oriented programming.
o OOPs, promote code reuse, thereby reducing redundancy.
o OOPs also helps to hide the unnecessary details with the help of Data
Abstraction.
o OOPs, are based on a bottom-up approach, unlike the Structural
programming paradigm, which uses a top-down approach.
o Polymorphism offers a lot of flexibility in OOPs.
9. Class
Object
Properties
Methods (or Functions)
9
Understand the
following terms
10. Class
A class is a blueprint. It is a piece of code describing how to
manage a topic or task in the way we want.
• It is a user-defined data type
• Inside a class, we define variables, constants, member functions, and other
functionality.
• it binds data and functions together in a single unit.
• It does not consume memory at run time.
Structuring Classes
declare a class using the class
keyword
followed by the name of the class and
a set of curly braces { }
<?php
class MyClass
{
// Class properties and methods
}
?>
11. Object
An object is a real-world entity that has attributes, behavior, and
properties. It is referred to as an instance of the class. It contains
member functions, variables that we have defined in the class. It
occupies space in the memory.
Different objects have different states or attributes, and behaviors.
Structuring Object
We created the object $myObject from
the class MyClass with the new keyword.
The process of creating an object is also
known as instantiation.
<?php
class MyClass
{
// Class properties and methods
}
$myObject = new MyClass();
?>
12. class vs object
class object
It is a logical entity. It is a real-world entity.
It is conceptual. It is real.
It binds data and methods together into a single unit. It is just like a variable of a class.
It does not occupy space in the memory. It occupies space in the memory.
It is a data type that represents the blueprint of an
object.
It is an instance of the class.
It is declared once. Multiple objects can be declared.
It uses the keyword class when declared. It uses the new keyword to create an object.
A class can exist without any object. Objects cannot exist without a class.
12
13. 13
Object
Characteristics
objects share the two common key characteristics
o State
o Behavior
State tells us how the object looks or what properties
it has.
Behavior tells us what the object does.
Object holds its state in variables that are often referred to as
properties.
Object also exposes its behavior via functions or methods.