SlideShare a Scribd company logo
OOP(Object-Oriented Programming)
Lecture 1 (Introduction)
• OOP (Object-oriented Programming) is a programming
paradigm used to design programs by dividing them into
objects. Each object represents a real-world entity,
containing data (attributes) and behaviours (methods).
• Advantages of OOP:
- Organized.
- Reusability.
- Readability.
- Performance.
• Objectives of OOP:
- Simplify code reuse.
- Reduce complexity by dividing programs into smaller units.
- Improve program maintenance and scalability.
• Java is a class-basd ,OOP language.
• Pyhton , C++ , visual Basic.NET also support OOP.
• Core Principles of OOP:
- Encapsulation: Hiding implementation details and protecting
data.
- Inheritance: Reusing code by allowing one class to inherit the
properties of another.
- Polymorphism: Using the same interface to perform different
operations.
- Abstraction: Showing only essential features while hiding
unnecessary details.
• A class is a blueprint or template used to create objects. It
contains attributes that represent data and methods that
represent behaviours.
• Example of a Class:
class Car {
String name; // Attribute
int speed; // Attribute
void start() { // Method
System.out.println("Car is starting...");
}
}
• A class itself is not an object but serves as a template for
creating objects.
• A class can include variables, methods, and even other nested
classes.
• Data can be described as property ,description ,feature ,quality
,trait ,attribute or characteristic.
• Method can be described as function , behaviour or operation.
• An object is an instance of a class created using the new
keyword. It represents an independent unit containing
attributes and methods that operate on them.
• Objects are the things you think about first in designing.
• How to Create an Object:
Car myCar = new Car(); // myCar is an object of the Car class
• Object Properties:
- Each object is allocated separate memory space.
- Different objects of the same class can have different attribute
values.
• The different between objects which are instance from same
class is data value.
• The different between class and object appear at run time.
• Object is NULL by default.
OOP & POP
OOP(Object-Oriented Programming)
POP(Procedure Oriented Programming)
Features
This type of programming language uses
objects and classes for creating models.
This programming language uses a step-by-step
approach for breaking down a task into a collection of
routines and variables by following a sequence of
instructions.
Definition
Parts known as objects.
Smaller parts called function.
Divided in to
Is given to data.
Is given to function.
importance
Bottom Up approach.
Top Down approach.
approach
Have access specifiers.
Don’t have any access specifiers.
Access Specifiers
Provide data hiding so it’s more secure.
Doesn’t have any proper way for hiding data so it’s less
secure.
Data Hiding
Is possible.
Is not possible.
Overloading
Organized around classes and objects.
Organized around functions and procedures.
Code
Organization
Supports inheritance .
Does not support.
Inheritance
C++, JAVA ,VB.NET, C#.NET
C, VB, Pascal
Examples
• Practical Example:
class Student {
String name; // Attribute
int age; // Attribute
void displayInfo() { // Method
System.out.println("Name: " + name);
System.out.println("Age: " + age);
}
}
public class Main {
public static void main(String[] args) {
Student student1 = new Student(); // Create an object
student1.name = "Ali";
student1.age = 20;
student1.displayInfo();
Student student2 = new Student(); // Create another object
student2.name = "Sara";
student2.age = 22;
student2.displayInfo();
}
}
Output:
Name: Ali
Age: 20
Name: Sara
Age: 22

More Related Content

PPTX
OOPs Java Module 1.pptx marketing trends social media company profilesmarketi...
PPTX
1 intro
PPTX
Object Oriented Programming in C++ in software development
PPT
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
PPTX
130704798265658191
PPTX
Object oriented programming
PPTX
Object oriented programming (oops) python
PDF
Computer_Programming_Part_II_Segment_01.pdf
OOPs Java Module 1.pptx marketing trends social media company profilesmarketi...
1 intro
Object Oriented Programming in C++ in software development
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
130704798265658191
Object oriented programming
Object oriented programming (oops) python
Computer_Programming_Part_II_Segment_01.pdf

Similar to lecture.in ooop object orented programmeg.pdf (20)

PPTX
chapterOne.pptxFSdgfqdzwwfagxgghvkjljhcxCZZXvcbx
PDF
CS3391 -OOP -UNIT – I NOTES FINAL.pdf
PPTX
Ch 1 Introduction to Object Oriented Programming.pptx
PPT
Java Fundamentalojhgghjjjjhhgghhjjjjhhj.ppt
PPTX
oop.pptx
PDF
6_Object-oriented-using-java.pdf object oriented programming concepts
PDF
ICT-REPORT_JAVA_OOP yuoiohjhhjgfgdgfdgf.pdf
PPTX
Object-Oriented Programming in Real world Applications
PPT
Share Unit 1- Basic concept of object-oriented-programming.ppt
PPTX
Object Oriented Program Class 12 Computer Science
PPTX
PHP OOP Lecture - 01.pptx
PPT
Basic Java Concept - Practical Oriented Methodologies
PPTX
introduction of Object oriented programming
PPTX
C++ in object oriented programming
PPTX
PPT_Object Oriented Programming .pptx
PPTX
PPT_Object Oriented Programming (2).pptx
PPTX
Oop ppt
PDF
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
PPTX
Lec 1.1 Object Oriented Programming
PDF
Oop basic overview
chapterOne.pptxFSdgfqdzwwfagxgghvkjljhcxCZZXvcbx
CS3391 -OOP -UNIT – I NOTES FINAL.pdf
Ch 1 Introduction to Object Oriented Programming.pptx
Java Fundamentalojhgghjjjjhhgghhjjjjhhj.ppt
oop.pptx
6_Object-oriented-using-java.pdf object oriented programming concepts
ICT-REPORT_JAVA_OOP yuoiohjhhjgfgdgfdgf.pdf
Object-Oriented Programming in Real world Applications
Share Unit 1- Basic concept of object-oriented-programming.ppt
Object Oriented Program Class 12 Computer Science
PHP OOP Lecture - 01.pptx
Basic Java Concept - Practical Oriented Methodologies
introduction of Object oriented programming
C++ in object oriented programming
PPT_Object Oriented Programming .pptx
PPT_Object Oriented Programming (2).pptx
Oop ppt
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
Lec 1.1 Object Oriented Programming
Oop basic overview
Ad

More from nabeehmohammedtaher (8)

PPTX
7 (1) the motor was very good Lock and complete.pptx
PPT
Lcdf3_chap_09 has been the subject for.ppt
PPT
10-Circuit-Packet and completed the .ppt
PDF
oop lecture5_٠٤٤٦٥٣.enArab you have r.pdf
PDF
‏‏‏‏‏‏oop lecture objectives will come.pdf
PDF
Lecture 8_٠٨٣٣٣٦taiz unvercity object oreinted programming.pdf
PDF
‏‏‏‏‏‏oop lecture 6_١٢٥٩٤٧taiz univercity.pdf
PDF
‏‏oop lecture 2 taiz univercity object programming.pdf
7 (1) the motor was very good Lock and complete.pptx
Lcdf3_chap_09 has been the subject for.ppt
10-Circuit-Packet and completed the .ppt
oop lecture5_٠٤٤٦٥٣.enArab you have r.pdf
‏‏‏‏‏‏oop lecture objectives will come.pdf
Lecture 8_٠٨٣٣٣٦taiz unvercity object oreinted programming.pdf
‏‏‏‏‏‏oop lecture 6_١٢٥٩٤٧taiz univercity.pdf
‏‏oop lecture 2 taiz univercity object programming.pdf
Ad

Recently uploaded (20)

PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Digital Strategies for Manufacturing Companies
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
Transform Your Business with a Software ERP System
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
L1 - Introduction to python Backend.pptx
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Understanding Forklifts - TECH EHS Solution
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
How Creative Agencies Leverage Project Management Software.pdf
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
Digital Strategies for Manufacturing Companies
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Transform Your Business with a Software ERP System
Odoo Companies in India – Driving Business Transformation.pdf
CHAPTER 2 - PM Management and IT Context
Softaken Excel to vCard Converter Software.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Online Work Permit System for Fast Permit Processing
L1 - Introduction to python Backend.pptx
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Design an Analysis of Algorithms II-SECS-1021-03
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Understanding Forklifts - TECH EHS Solution
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)

lecture.in ooop object orented programmeg.pdf

  • 2. • OOP (Object-oriented Programming) is a programming paradigm used to design programs by dividing them into objects. Each object represents a real-world entity, containing data (attributes) and behaviours (methods). • Advantages of OOP: - Organized. - Reusability. - Readability. - Performance.
  • 3. • Objectives of OOP: - Simplify code reuse. - Reduce complexity by dividing programs into smaller units. - Improve program maintenance and scalability. • Java is a class-basd ,OOP language. • Pyhton , C++ , visual Basic.NET also support OOP.
  • 4. • Core Principles of OOP: - Encapsulation: Hiding implementation details and protecting data. - Inheritance: Reusing code by allowing one class to inherit the properties of another. - Polymorphism: Using the same interface to perform different operations. - Abstraction: Showing only essential features while hiding unnecessary details.
  • 5. • A class is a blueprint or template used to create objects. It contains attributes that represent data and methods that represent behaviours. • Example of a Class: class Car { String name; // Attribute int speed; // Attribute void start() { // Method System.out.println("Car is starting..."); } }
  • 6. • A class itself is not an object but serves as a template for creating objects. • A class can include variables, methods, and even other nested classes. • Data can be described as property ,description ,feature ,quality ,trait ,attribute or characteristic. • Method can be described as function , behaviour or operation.
  • 7. • An object is an instance of a class created using the new keyword. It represents an independent unit containing attributes and methods that operate on them. • Objects are the things you think about first in designing. • How to Create an Object: Car myCar = new Car(); // myCar is an object of the Car class
  • 8. • Object Properties: - Each object is allocated separate memory space. - Different objects of the same class can have different attribute values. • The different between objects which are instance from same class is data value. • The different between class and object appear at run time. • Object is NULL by default.
  • 9. OOP & POP OOP(Object-Oriented Programming) POP(Procedure Oriented Programming) Features This type of programming language uses objects and classes for creating models. This programming language uses a step-by-step approach for breaking down a task into a collection of routines and variables by following a sequence of instructions. Definition Parts known as objects. Smaller parts called function. Divided in to Is given to data. Is given to function. importance Bottom Up approach. Top Down approach. approach Have access specifiers. Don’t have any access specifiers. Access Specifiers Provide data hiding so it’s more secure. Doesn’t have any proper way for hiding data so it’s less secure. Data Hiding Is possible. Is not possible. Overloading Organized around classes and objects. Organized around functions and procedures. Code Organization Supports inheritance . Does not support. Inheritance C++, JAVA ,VB.NET, C#.NET C, VB, Pascal Examples
  • 10. • Practical Example: class Student { String name; // Attribute int age; // Attribute void displayInfo() { // Method System.out.println("Name: " + name); System.out.println("Age: " + age); } }
  • 11. public class Main { public static void main(String[] args) { Student student1 = new Student(); // Create an object student1.name = "Ali"; student1.age = 20; student1.displayInfo(); Student student2 = new Student(); // Create another object student2.name = "Sara"; student2.age = 22; student2.displayInfo(); } }