SlideShare a Scribd company logo
CMP-2123-Object
Oriented Programming
Lecture 1.1
By
Abrar Ahmad
Abrar.ahmad14@ce.ceme.edu.pk
Course Introduction
•Prerequisites
•Programming Fundamentals
•Course Objective
•This course aims to develop students’ Objects
oriented programming skills.
2arbabwaseer@gmail.com
Course Introduction
•Textbook
•Java Programming From the Ground Up by Ralph
Bravaco and Shai Simonson, McGraw-Hill Higher
Education New York, 2010, ISBN: 978-0-07-352335-4
•Ivor Horton’s Beginning Java by Ivor Horton, John
Wiley & Sons, Inc. 7th Edition, 2011, ISBN: 978-0-470-
40414-0
3arbabwaseer@gmail.com
Course Introduction
•Reference Material
•Java TM Programming by Joycee Farrell,6th Edition,
Cengage Learning, 2012, ISBN-13: 978-1-111-
52944-4
•Java TM How to Program By Paul Deitel and Harvery
Deitel, Pearson,9th Edition, 2012, ISBN-13: 978-0-
13-257566-9
4arbabwaseer@gmail.com
Course Overview
• Objects and Classes, Abstraction Encapsulation
• Final Classes, Nested and Inner Classes
• Inheritance, Abstract Classes, Concrete Classes,
Inheritance and Encapsulation
• The is-a Relationship, Inheritance via Abstract Classes,
Extending the Hierarchy, Upcasting and Downcasting,
Interfaces
5arbabwaseer@gmail.com
Course Overview
• Composition, has-a Relationship
• Polymorphism
• Dynamic Binding
• Interfaces and Polymorphism
6arbabwaseer@gmail.com
Course Overview
•The Wrapper Classes, Boxing and Unboxing Packages
•Exceptions and Exception Handling
•File System and paths, File Directory Handling and
Manipulation, Input/Output Streams, Reading Binary Data,
Writing Binary Data, Writing Text, reading text, Logging
with PrintStream, Random Access Files, Serialization
•Collection for-each Loop
7arbabwaseer@gmail.com
Course Overview
• GUI Concepts, Components and Containers, Abstract
Windows Toolkit and Swing, Windows and Frames, Layout
Managers, Panels
• Event-Driven Programming, The Delegation Event Model
• Event Classes, Mouse Events, Keyboard Events, Using Actions
• Component and Jcomponent, Buttons, Labels, Text Fields,
Text Areas, Dialog Boxes, Checkboxes, and Radio Buttons,
Menus, Jslider, JTabbedPane
8arbabwaseer@gmail.com
What is OOP
• Object-oriented programming (OOP) is a programming
language model organized around objects rather than
"actions" and data rather than logic.
• Historically, a program has been viewed as a logical
procedure that
• takes input data
• processes it
• produces output data.
• The programming challenge was seen as how to write the
logic, not how to define the data.
9arbabwaseer@gmail.com
What is OOP
• Object-oriented programming takes the view that what we really
care about are the objects we want to manipulate rather than
the logic required to manipulate them.
• Example
• Human Being
• Name
• Height
• Age
• Gender
• Race
• etc
10arbabwaseer@gmail.com
What is OOP
•Object Oriented Programming is an engineering
approach for building software systems
•Based on the concepts of
•Classes
•Objects
That are used for modeling the real world entities.
11arbabwaseer@gmail.com
Why OOP
•Better suited for team development
•Facilitate utilizing and creating reusable components.
•Easier GUI Programming
•Easier Software maintenance
12arbabwaseer@gmail.com
Principles of OOP
•Inheritance
•Abstraction
•Encapsulation
•Polymorphism
13arbabwaseer@gmail.com
About
• Simula is considered as the first object-oriented
programming language. The programming paradigm
where everything is represented as an object, is
known as truly object-oriented programming
language.
14arbabwaseer@gmail.com
OOP
• Object means a real word entity such as pen, chair, table etc. Object-
Oriented Programming is a methodology or paradigm to design a
program using classes and objects. It simplifies the software
development and maintenance by providing some concepts:
• Object
• Class
• Inheritance
• Polymorphism
• Abstraction
• Encapsulation
15arbabwaseer@gmail.com
Object:
Any entity that has state and behavior is known as an
object. For example: chair, pen, table, keyboard, bike
etc. It can be physical and logical. 16arbabwaseer@gmail.com
• Syntax to declare a class:
•Class
• Collection of objects is called class. It is a logical entity.
17arbabwaseer@gmail.com
Simple Example of Object and Class
• In this example, we have created a Student class that have two data
members id and name. We are creating the object of the Student
class by new keyword and printing the objects value.
18arbabwaseer@gmail.com
19arbabwaseer@gmail.com
20arbabwaseer@gmail.com
•Polymorphism
• When one task is performed by different ways i.e. known as
polymorphism. For example: to convince the customer
differently, to draw something e.g. shape or rectangle etc.
• In java, we use method overloading and method overriding to
achieve polymorphism.
• Another example can be to speak something e.g. cat speaks
meaw, dog barks woof etc.
•Inheritance
• When one object acquires all the properties and behaviors
of parent object i.e. known as inheritance. It provides code
reusability. It is used to achieve runtime polymorphism.
21arbabwaseer@gmail.com
22arbabwaseer@gmail.com
• Abstraction
• Hiding internal details and showing functionality is known as
abstraction. For example: phone call, we don't know the internal
processing.
• In java, we use abstract class and interface to achieve abstraction.
•Encapsulation
• Binding (or wrapping) code and data together into a single
unit is known as encapsulation. For example: capsule, it is
wrapped with different medicines.
• A java class is the example of encapsulation. Java bean is the
fully encapsulated class because all the data members are
private here.
23arbabwaseer@gmail.com
24arbabwaseer@gmail.com
Advantage of OOPs over Procedure-
oriented programming language
• OOPs makes development and maintenance easier where as
in Procedure-oriented programming language it is not easy
to manage if code grows as project size grows.
• OOPs provides data hiding whereas in Procedure-oriented
programming language a global data can be accessed from
anywhere.
• OOPs provides ability to simulate real-world event much
more effectively. We can provide the solution of real word
problem if we are using the Object-Oriented Programming
language. 25arbabwaseer@gmail.com
26arbabwaseer@gmail.com
•What is difference between object-oriented
programming language and object-based
programming language?
• Object based programming language follows all the
features of OOPs except Inheritance. JavaScript and
VBScript are examples of object based
programming languages.
27arbabwaseer@gmail.com
Ad

More Related Content

Similar to Lec 1.1 Object Oriented Programming (20)

Intro to oop.pptx
Intro to oop.pptxIntro to oop.pptx
Intro to oop.pptx
UmerUmer25
 
U1 JAVA.pptx
U1 JAVA.pptxU1 JAVA.pptx
U1 JAVA.pptx
madan r
 
Object-Oriented concepts.pptx
Object-Oriented concepts.pptxObject-Oriented concepts.pptx
Object-Oriented concepts.pptx
BHARATH KUMAR
 
Understanding the Basics of Object-Oriented Programming for Beginners
Understanding the Basics of Object-Oriented Programming for BeginnersUnderstanding the Basics of Object-Oriented Programming for Beginners
Understanding the Basics of Object-Oriented Programming for Beginners
Emma Jacob
 
Object oriented programming concept- Saurabh Upadhyay
Object oriented programming concept- Saurabh UpadhyayObject oriented programming concept- Saurabh Upadhyay
Object oriented programming concept- Saurabh Upadhyay
Saurabh Upadhyay
 
Oops
OopsOops
Oops
baabtra.com - No. 1 supplier of quality freshers
 
C# by Zaheer Abbas Aghani
C# by Zaheer Abbas AghaniC# by Zaheer Abbas Aghani
C# by Zaheer Abbas Aghani
Information Technology Center
 
C# by Zaheer Abbas Aghani
C# by Zaheer Abbas AghaniC# by Zaheer Abbas Aghani
C# by Zaheer Abbas Aghani
Information Technology Center
 
Top 100 Java Interview Questions with Detailed Answers
Top 100 Java Interview Questions with Detailed AnswersTop 100 Java Interview Questions with Detailed Answers
Top 100 Java Interview Questions with Detailed Answers
Whizlabs
 
Introduction to oop and java fundamentals
Introduction to oop and java fundamentalsIntroduction to oop and java fundamentals
Introduction to oop and java fundamentals
AnsgarMary
 
C++ in object oriented programming
C++ in object oriented programmingC++ in object oriented programming
C++ in object oriented programming
Saket Khopkar
 
introduction of Object oriented programming
introduction of Object oriented programmingintroduction of Object oriented programming
introduction of Object oriented programming
RiturajJain8
 
Introduction To Design Patterns Class 4 Composition vs Inheritance
 Introduction To Design Patterns Class 4 Composition vs Inheritance Introduction To Design Patterns Class 4 Composition vs Inheritance
Introduction To Design Patterns Class 4 Composition vs Inheritance
Blue Elephant Consulting
 
oop.pptx
oop.pptxoop.pptx
oop.pptx
KabitaParajuli3
 
Class and Objects in python programming.pptx
Class and Objects in python programming.pptxClass and Objects in python programming.pptx
Class and Objects in python programming.pptx
Rajtherock
 
CPP-Unit 1.pptx
CPP-Unit 1.pptxCPP-Unit 1.pptx
CPP-Unit 1.pptx
YashKoli22
 
MongoDB World 2019: A Tale of Two Use Cases: Innovative MongoDB Solutions for...
MongoDB World 2019: A Tale of Two Use Cases: Innovative MongoDB Solutions for...MongoDB World 2019: A Tale of Two Use Cases: Innovative MongoDB Solutions for...
MongoDB World 2019: A Tale of Two Use Cases: Innovative MongoDB Solutions for...
MongoDB
 
Pi j1.0 workshop-introduction
Pi j1.0 workshop-introductionPi j1.0 workshop-introduction
Pi j1.0 workshop-introduction
mcollison
 
Java Fundamentals Of Computer Science Using Java
Java   Fundamentals Of Computer Science Using JavaJava   Fundamentals Of Computer Science Using Java
Java Fundamentals Of Computer Science Using Java
Prabhu vip
 
SKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPTSKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPT
Skillwise Group
 
Intro to oop.pptx
Intro to oop.pptxIntro to oop.pptx
Intro to oop.pptx
UmerUmer25
 
U1 JAVA.pptx
U1 JAVA.pptxU1 JAVA.pptx
U1 JAVA.pptx
madan r
 
Object-Oriented concepts.pptx
Object-Oriented concepts.pptxObject-Oriented concepts.pptx
Object-Oriented concepts.pptx
BHARATH KUMAR
 
Understanding the Basics of Object-Oriented Programming for Beginners
Understanding the Basics of Object-Oriented Programming for BeginnersUnderstanding the Basics of Object-Oriented Programming for Beginners
Understanding the Basics of Object-Oriented Programming for Beginners
Emma Jacob
 
Object oriented programming concept- Saurabh Upadhyay
Object oriented programming concept- Saurabh UpadhyayObject oriented programming concept- Saurabh Upadhyay
Object oriented programming concept- Saurabh Upadhyay
Saurabh Upadhyay
 
Top 100 Java Interview Questions with Detailed Answers
Top 100 Java Interview Questions with Detailed AnswersTop 100 Java Interview Questions with Detailed Answers
Top 100 Java Interview Questions with Detailed Answers
Whizlabs
 
Introduction to oop and java fundamentals
Introduction to oop and java fundamentalsIntroduction to oop and java fundamentals
Introduction to oop and java fundamentals
AnsgarMary
 
C++ in object oriented programming
C++ in object oriented programmingC++ in object oriented programming
C++ in object oriented programming
Saket Khopkar
 
introduction of Object oriented programming
introduction of Object oriented programmingintroduction of Object oriented programming
introduction of Object oriented programming
RiturajJain8
 
Introduction To Design Patterns Class 4 Composition vs Inheritance
 Introduction To Design Patterns Class 4 Composition vs Inheritance Introduction To Design Patterns Class 4 Composition vs Inheritance
Introduction To Design Patterns Class 4 Composition vs Inheritance
Blue Elephant Consulting
 
Class and Objects in python programming.pptx
Class and Objects in python programming.pptxClass and Objects in python programming.pptx
Class and Objects in python programming.pptx
Rajtherock
 
CPP-Unit 1.pptx
CPP-Unit 1.pptxCPP-Unit 1.pptx
CPP-Unit 1.pptx
YashKoli22
 
MongoDB World 2019: A Tale of Two Use Cases: Innovative MongoDB Solutions for...
MongoDB World 2019: A Tale of Two Use Cases: Innovative MongoDB Solutions for...MongoDB World 2019: A Tale of Two Use Cases: Innovative MongoDB Solutions for...
MongoDB World 2019: A Tale of Two Use Cases: Innovative MongoDB Solutions for...
MongoDB
 
Pi j1.0 workshop-introduction
Pi j1.0 workshop-introductionPi j1.0 workshop-introduction
Pi j1.0 workshop-introduction
mcollison
 
Java Fundamentals Of Computer Science Using Java
Java   Fundamentals Of Computer Science Using JavaJava   Fundamentals Of Computer Science Using Java
Java Fundamentals Of Computer Science Using Java
Prabhu vip
 
SKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPTSKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPT
Skillwise Group
 

More from Badar Waseer (20)

Ch 03 s.e agile development
Ch 03 s.e agile developmentCh 03 s.e agile development
Ch 03 s.e agile development
Badar Waseer
 
Ch 02 s.e software process models 1
Ch 02 s.e software process models   1Ch 02 s.e software process models   1
Ch 02 s.e software process models 1
Badar Waseer
 
Ch 01 s.e introduction
Ch 01 s.e introductionCh 01 s.e introduction
Ch 01 s.e introduction
Badar Waseer
 
Ch 14 s.e use case diagrams
Ch 14 s.e use case diagramsCh 14 s.e use case diagrams
Ch 14 s.e use case diagrams
Badar Waseer
 
Ch 13 s.e cmmi
Ch 13 s.e cmmiCh 13 s.e cmmi
Ch 13 s.e cmmi
Badar Waseer
 
Lec 1.9 oop
Lec 1.9 oopLec 1.9 oop
Lec 1.9 oop
Badar Waseer
 
Lec 1.8 Object Oriented Programming
Lec 1.8 Object Oriented ProgrammingLec 1.8 Object Oriented Programming
Lec 1.8 Object Oriented Programming
Badar Waseer
 
Lec 1.7 Object Oriented Programming
Lec 1.7 Object Oriented ProgrammingLec 1.7 Object Oriented Programming
Lec 1.7 Object Oriented Programming
Badar Waseer
 
Lec 1.6 Object Oriented Programming
Lec 1.6 Object Oriented ProgrammingLec 1.6 Object Oriented Programming
Lec 1.6 Object Oriented Programming
Badar Waseer
 
Lec 1.5 Object Oriented Programming
Lec 1.5 Object Oriented ProgrammingLec 1.5 Object Oriented Programming
Lec 1.5 Object Oriented Programming
Badar Waseer
 
Lec 1.4 Object Oriented Programming
Lec 1.4 Object Oriented ProgrammingLec 1.4 Object Oriented Programming
Lec 1.4 Object Oriented Programming
Badar Waseer
 
Lec 1.3 Object Oriented Programming
Lec 1.3 Object Oriented ProgrammingLec 1.3 Object Oriented Programming
Lec 1.3 Object Oriented Programming
Badar Waseer
 
Lec 1.10 Object Oriented Programming
Lec 1.10 Object Oriented ProgrammingLec 1.10 Object Oriented Programming
Lec 1.10 Object Oriented Programming
Badar Waseer
 
Multimedia System & Design Ch 7 multimedia skills
Multimedia System & Design Ch 7 multimedia skillsMultimedia System & Design Ch 7 multimedia skills
Multimedia System & Design Ch 7 multimedia skills
Badar Waseer
 
Multimedia System & Design Ch 6 animation
Multimedia System & Design Ch 6 animationMultimedia System & Design Ch 6 animation
Multimedia System & Design Ch 6 animation
Badar Waseer
 
Multimedia System & Design Ch 5 video
Multimedia System & Design Ch 5 videoMultimedia System & Design Ch 5 video
Multimedia System & Design Ch 5 video
Badar Waseer
 
Multimedia System & Design Ch 4 Audio
Multimedia System & Design Ch 4 AudioMultimedia System & Design Ch 4 Audio
Multimedia System & Design Ch 4 Audio
Badar Waseer
 
Multimedia System & Design Ch 1, 2, 3 Multimedia
Multimedia System & Design Ch 1, 2, 3 MultimediaMultimedia System & Design Ch 1, 2, 3 Multimedia
Multimedia System & Design Ch 1, 2, 3 Multimedia
Badar Waseer
 
Multimedia System & Design Ch 8 delivering
Multimedia System & Design Ch 8 deliveringMultimedia System & Design Ch 8 delivering
Multimedia System & Design Ch 8 delivering
Badar Waseer
 
Agriculture Information System (AIS)
Agriculture Information System (AIS)Agriculture Information System (AIS)
Agriculture Information System (AIS)
Badar Waseer
 
Ch 03 s.e agile development
Ch 03 s.e agile developmentCh 03 s.e agile development
Ch 03 s.e agile development
Badar Waseer
 
Ch 02 s.e software process models 1
Ch 02 s.e software process models   1Ch 02 s.e software process models   1
Ch 02 s.e software process models 1
Badar Waseer
 
Ch 01 s.e introduction
Ch 01 s.e introductionCh 01 s.e introduction
Ch 01 s.e introduction
Badar Waseer
 
Ch 14 s.e use case diagrams
Ch 14 s.e use case diagramsCh 14 s.e use case diagrams
Ch 14 s.e use case diagrams
Badar Waseer
 
Lec 1.8 Object Oriented Programming
Lec 1.8 Object Oriented ProgrammingLec 1.8 Object Oriented Programming
Lec 1.8 Object Oriented Programming
Badar Waseer
 
Lec 1.7 Object Oriented Programming
Lec 1.7 Object Oriented ProgrammingLec 1.7 Object Oriented Programming
Lec 1.7 Object Oriented Programming
Badar Waseer
 
Lec 1.6 Object Oriented Programming
Lec 1.6 Object Oriented ProgrammingLec 1.6 Object Oriented Programming
Lec 1.6 Object Oriented Programming
Badar Waseer
 
Lec 1.5 Object Oriented Programming
Lec 1.5 Object Oriented ProgrammingLec 1.5 Object Oriented Programming
Lec 1.5 Object Oriented Programming
Badar Waseer
 
Lec 1.4 Object Oriented Programming
Lec 1.4 Object Oriented ProgrammingLec 1.4 Object Oriented Programming
Lec 1.4 Object Oriented Programming
Badar Waseer
 
Lec 1.3 Object Oriented Programming
Lec 1.3 Object Oriented ProgrammingLec 1.3 Object Oriented Programming
Lec 1.3 Object Oriented Programming
Badar Waseer
 
Lec 1.10 Object Oriented Programming
Lec 1.10 Object Oriented ProgrammingLec 1.10 Object Oriented Programming
Lec 1.10 Object Oriented Programming
Badar Waseer
 
Multimedia System & Design Ch 7 multimedia skills
Multimedia System & Design Ch 7 multimedia skillsMultimedia System & Design Ch 7 multimedia skills
Multimedia System & Design Ch 7 multimedia skills
Badar Waseer
 
Multimedia System & Design Ch 6 animation
Multimedia System & Design Ch 6 animationMultimedia System & Design Ch 6 animation
Multimedia System & Design Ch 6 animation
Badar Waseer
 
Multimedia System & Design Ch 5 video
Multimedia System & Design Ch 5 videoMultimedia System & Design Ch 5 video
Multimedia System & Design Ch 5 video
Badar Waseer
 
Multimedia System & Design Ch 4 Audio
Multimedia System & Design Ch 4 AudioMultimedia System & Design Ch 4 Audio
Multimedia System & Design Ch 4 Audio
Badar Waseer
 
Multimedia System & Design Ch 1, 2, 3 Multimedia
Multimedia System & Design Ch 1, 2, 3 MultimediaMultimedia System & Design Ch 1, 2, 3 Multimedia
Multimedia System & Design Ch 1, 2, 3 Multimedia
Badar Waseer
 
Multimedia System & Design Ch 8 delivering
Multimedia System & Design Ch 8 deliveringMultimedia System & Design Ch 8 delivering
Multimedia System & Design Ch 8 delivering
Badar Waseer
 
Agriculture Information System (AIS)
Agriculture Information System (AIS)Agriculture Information System (AIS)
Agriculture Information System (AIS)
Badar Waseer
 
Ad

Recently uploaded (20)

Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
Nguyen Thanh Tu Collection
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Engage Donors Through Powerful Storytelling.pdf
Engage Donors Through Powerful Storytelling.pdfEngage Donors Through Powerful Storytelling.pdf
Engage Donors Through Powerful Storytelling.pdf
TechSoup
 
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
National Information Standards Organization (NISO)
 
Contact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: OptometryContact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: Optometry
MushahidRaza8
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFAExercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
dynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south Indiadynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south India
PrachiSontakke5
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Sugar-Sensing Mechanism in plants....pptx
Sugar-Sensing Mechanism in plants....pptxSugar-Sensing Mechanism in plants....pptx
Sugar-Sensing Mechanism in plants....pptx
Dr. Renu Jangid
 
Real GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for SuccessReal GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for Success
Mark Soia
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
Grade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable WorksheetGrade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable Worksheet
Sritoma Majumder
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
Nguyen Thanh Tu Collection
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Engage Donors Through Powerful Storytelling.pdf
Engage Donors Through Powerful Storytelling.pdfEngage Donors Through Powerful Storytelling.pdf
Engage Donors Through Powerful Storytelling.pdf
TechSoup
 
Contact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: OptometryContact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: Optometry
MushahidRaza8
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFAExercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
dynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south Indiadynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south India
PrachiSontakke5
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Sugar-Sensing Mechanism in plants....pptx
Sugar-Sensing Mechanism in plants....pptxSugar-Sensing Mechanism in plants....pptx
Sugar-Sensing Mechanism in plants....pptx
Dr. Renu Jangid
 
Real GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for SuccessReal GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for Success
Mark Soia
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
Grade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable WorksheetGrade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable Worksheet
Sritoma Majumder
 
Ad

Lec 1.1 Object Oriented Programming

  • 2. Course Introduction •Prerequisites •Programming Fundamentals •Course Objective •This course aims to develop students’ Objects oriented programming skills. [email protected]
  • 3. Course Introduction •Textbook •Java Programming From the Ground Up by Ralph Bravaco and Shai Simonson, McGraw-Hill Higher Education New York, 2010, ISBN: 978-0-07-352335-4 •Ivor Horton’s Beginning Java by Ivor Horton, John Wiley & Sons, Inc. 7th Edition, 2011, ISBN: 978-0-470- 40414-0 [email protected]
  • 4. Course Introduction •Reference Material •Java TM Programming by Joycee Farrell,6th Edition, Cengage Learning, 2012, ISBN-13: 978-1-111- 52944-4 •Java TM How to Program By Paul Deitel and Harvery Deitel, Pearson,9th Edition, 2012, ISBN-13: 978-0- 13-257566-9 [email protected]
  • 5. Course Overview • Objects and Classes, Abstraction Encapsulation • Final Classes, Nested and Inner Classes • Inheritance, Abstract Classes, Concrete Classes, Inheritance and Encapsulation • The is-a Relationship, Inheritance via Abstract Classes, Extending the Hierarchy, Upcasting and Downcasting, Interfaces [email protected]
  • 6. Course Overview • Composition, has-a Relationship • Polymorphism • Dynamic Binding • Interfaces and Polymorphism [email protected]
  • 7. Course Overview •The Wrapper Classes, Boxing and Unboxing Packages •Exceptions and Exception Handling •File System and paths, File Directory Handling and Manipulation, Input/Output Streams, Reading Binary Data, Writing Binary Data, Writing Text, reading text, Logging with PrintStream, Random Access Files, Serialization •Collection for-each Loop [email protected]
  • 8. Course Overview • GUI Concepts, Components and Containers, Abstract Windows Toolkit and Swing, Windows and Frames, Layout Managers, Panels • Event-Driven Programming, The Delegation Event Model • Event Classes, Mouse Events, Keyboard Events, Using Actions • Component and Jcomponent, Buttons, Labels, Text Fields, Text Areas, Dialog Boxes, Checkboxes, and Radio Buttons, Menus, Jslider, JTabbedPane [email protected]
  • 9. What is OOP • Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic. • Historically, a program has been viewed as a logical procedure that • takes input data • processes it • produces output data. • The programming challenge was seen as how to write the logic, not how to define the data. [email protected]
  • 10. What is OOP • Object-oriented programming takes the view that what we really care about are the objects we want to manipulate rather than the logic required to manipulate them. • Example • Human Being • Name • Height • Age • Gender • Race • etc [email protected]
  • 11. What is OOP •Object Oriented Programming is an engineering approach for building software systems •Based on the concepts of •Classes •Objects That are used for modeling the real world entities. [email protected]
  • 12. Why OOP •Better suited for team development •Facilitate utilizing and creating reusable components. •Easier GUI Programming •Easier Software maintenance [email protected]
  • 14. About • Simula is considered as the first object-oriented programming language. The programming paradigm where everything is represented as an object, is known as truly object-oriented programming language. [email protected]
  • 15. OOP • Object means a real word entity such as pen, chair, table etc. Object- Oriented Programming is a methodology or paradigm to design a program using classes and objects. It simplifies the software development and maintenance by providing some concepts: • Object • Class • Inheritance • Polymorphism • Abstraction • Encapsulation [email protected]
  • 16. Object: Any entity that has state and behavior is known as an object. For example: chair, pen, table, keyboard, bike etc. It can be physical and logical. [email protected]
  • 17. • Syntax to declare a class: •Class • Collection of objects is called class. It is a logical entity. [email protected]
  • 18. Simple Example of Object and Class • In this example, we have created a Student class that have two data members id and name. We are creating the object of the Student class by new keyword and printing the objects value. [email protected]
  • 21. •Polymorphism • When one task is performed by different ways i.e. known as polymorphism. For example: to convince the customer differently, to draw something e.g. shape or rectangle etc. • In java, we use method overloading and method overriding to achieve polymorphism. • Another example can be to speak something e.g. cat speaks meaw, dog barks woof etc. •Inheritance • When one object acquires all the properties and behaviors of parent object i.e. known as inheritance. It provides code reusability. It is used to achieve runtime polymorphism. [email protected]
  • 23. • Abstraction • Hiding internal details and showing functionality is known as abstraction. For example: phone call, we don't know the internal processing. • In java, we use abstract class and interface to achieve abstraction. •Encapsulation • Binding (or wrapping) code and data together into a single unit is known as encapsulation. For example: capsule, it is wrapped with different medicines. • A java class is the example of encapsulation. Java bean is the fully encapsulated class because all the data members are private here. [email protected]
  • 25. Advantage of OOPs over Procedure- oriented programming language • OOPs makes development and maintenance easier where as in Procedure-oriented programming language it is not easy to manage if code grows as project size grows. • OOPs provides data hiding whereas in Procedure-oriented programming language a global data can be accessed from anywhere. • OOPs provides ability to simulate real-world event much more effectively. We can provide the solution of real word problem if we are using the Object-Oriented Programming language. [email protected]
  • 27. •What is difference between object-oriented programming language and object-based programming language? • Object based programming language follows all the features of OOPs except Inheritance. JavaScript and VBScript are examples of object based programming languages. [email protected]