SlideShare a Scribd company logo
19Z305OBJECT
ORIENTED
PROGRAMMING
Unit 1
11/20/2020 Vani Kandhasamy,PSG Tech 2
Overview
 Features of OOP
 Abstraction
 Classes and Objects
 Encapsulation
 Inheritance
 Polymorphism
11/20/2020 Vani Kandhasamy,PSG Tech 3
Problem Sheet
1
Suppose you want to automate saving account system of a bank.
Each account, has following information
Account No, Account Holder Name, Balance
Following Bank branch operations
Open an account
Deposit money into a account
Withdraw Money from Account
Transfer money between accounts
Get Account details
Close an account
11/20/2020 Vani Kandhasamy,PSG Tech 4
Procedural
Programming
11/20/2020 Vani Kandhasamy,PSG Tech 5
Procedural
Programming
 Principle: Functional Decomposition
 Drawback:
 Hard to include new features
 Spaghetti code
11/20/2020 Vani Kandhasamy,PSG Tech 6
Features of
OOP
11/20/2020 Vani Kandhasamy,PSG Tech 7
Classes &
Objects
Class <class name> {
}
11/20/2020 Vani Kandhasamy,PSG Tech 9
Data Members
Methods
How to represent Box as Class?
Classes &
Objects
Class <class name> {
}
11/20/2020 Vani Kandhasamy,PSG Tech 10
Data Members
Methods
Objects
Abstraction
Goal: to handle complexity by hiding unnecessary details from the user
11/20/2020 Vani Kandhasamy,PSG Tech 11
Encapsulation
Goal: binding object members and methods together and to keep
them safe from external interference
11/20/2020 Vani Kandhasamy,PSG Tech 12
Encapsulation Data Hiding Abstraction
Access
Specifiers
11/20/2020 Vani Kandhasamy,PSG Tech 13
Encapsulation
11/20/2020 Vani Kandhasamy,PSG Tech 14
Inheritance
Inherit common behaviors
11/20/2020 Vani Kandhasamy,PSG Tech 15
Inheritance
Goal: to improve reusability of the code and reduce redundant
code
11/20/2020 Vani Kandhasamy,PSG Tech 16
BankAccount
-withdraw()
-deposit()
-transfer()
SavingsAccount
-calculateInterest()
CurrentAccount
-calculateCharges()
Polymorphism
Ability to appear in many forms
11/20/2020 Vani Kandhasamy,PSG Tech 17
References
 "Java:The Complete Reference” by Schildt H - Part 1 - Chapter 2
 https://www.w3schools.com/java/
 https://docs.oracle.com/javase/tutorial/java/TOC.html
11/20/2020 Vani Kandhasamy,PSG Tech 21

More Related Content

PPTX
SAP FICA Training
PDF
SAP FI AP: Configuration & End User Guide
PPTX
Pentaho-BI
DOCX
Lockbox configuration
PPTX
ICO Research Report - BET Token Issuance by DAO.Casino
DOCX
Lockbox process
PDF
Professional AI projects the easy way slides
DOC
BIN-ITPD-2600 04c User Reference Manual Accounts Payables v0
SAP FICA Training
SAP FI AP: Configuration & End User Guide
Pentaho-BI
Lockbox configuration
ICO Research Report - BET Token Issuance by DAO.Casino
Lockbox process
Professional AI projects the easy way slides
BIN-ITPD-2600 04c User Reference Manual Accounts Payables v0

Similar to Introduction to OOP (12)

DOCX
MIS 442 Report
DOCX
Mis 442 report
PDF
Getting started-with-oracle-so a-viii
PPTX
Azure IoT Hub on a Toradex Colibri VF61 – Part 3: Using Cloud Services to col...
DOC
BIN-ITPD-2100.04c User Reference Manual FI Module Banking
PDF
Electronic bank statement mt940 format
DOCX
1 eg s4hana1909_bpd_en_mx
PDF
JIRA How Tos
PDF
Positive pay edi process in sap
PDF
Another billion devices STOB5
PDF
データサイエンティストの仕事とデータ分析コンテスト
PPS
Vb net xp_08
MIS 442 Report
Mis 442 report
Getting started-with-oracle-so a-viii
Azure IoT Hub on a Toradex Colibri VF61 – Part 3: Using Cloud Services to col...
BIN-ITPD-2100.04c User Reference Manual FI Module Banking
Electronic bank statement mt940 format
1 eg s4hana1909_bpd_en_mx
JIRA How Tos
Positive pay edi process in sap
Another billion devices STOB5
データサイエンティストの仕事とデータ分析コンテスト
Vb net xp_08
Ad

More from Vani Kandhasamy (11)

PDF
Java Basics - Part2
PDF
Java Basics - Part1
PDF
Economic network analysis - Part 2
PDF
Economic network analysis - Part 1
PDF
Cascading behavior in the networks
PDF
Community detection-Part2
PDF
Community detection-Part1
PDF
Link Analysis
PDF
Network Models
PDF
Representing & Measuring networks
PDF
Cache optimization
Java Basics - Part2
Java Basics - Part1
Economic network analysis - Part 2
Economic network analysis - Part 1
Cascading behavior in the networks
Community detection-Part2
Community detection-Part1
Link Analysis
Network Models
Representing & Measuring networks
Cache optimization
Ad

Recently uploaded (20)

PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Geodesy 1.pptx...............................................
PPTX
UNIT 4 Total Quality Management .pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
DOCX
573137875-Attendance-Management-System-original
PPT
Project quality management in manufacturing
PDF
PPT on Performance Review to get promotions
PPTX
web development for engineering and engineering
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Artificial Intelligence
PDF
737-MAX_SRG.pdf student reference guides
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
CYBER-CRIMES AND SECURITY A guide to understanding
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Mechanical Engineering MATERIALS Selection
Geodesy 1.pptx...............................................
UNIT 4 Total Quality Management .pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
Automation-in-Manufacturing-Chapter-Introduction.pdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
573137875-Attendance-Management-System-original
Project quality management in manufacturing
PPT on Performance Review to get promotions
web development for engineering and engineering
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Artificial Intelligence
737-MAX_SRG.pdf student reference guides
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems

Introduction to OOP