SlideShare a Scribd company logo
Object Oriented Programming
Problem Description
“ …customers are allowed to have
different types of bank accounts,
deposit money, withdraw money and
transfer money between accounts”
Procedural Approach
bool MakeDeposit(int accountNum,float amount);
float Withdraw(int accountNum,float amount);
struct Account {
char *name;
int accountNum;
float balance;
char accountType;
};
Procedural Approach cont’d
Focus is on procedures
All data is shared: no protection
More difficult to modify
Hard to manage complexity
Procedural vs. Object-Oriented
Procedural
Withdraw, deposit, transfer
Object Oriented
Customer, money, account
Mapping the world to software
Objects in the problem domain are mapped
to objects in software
Object Oriented
Data and operations are grouped together
Account
Withdraw
Deposit
Transfer
Interface:
Set of available operations
Data Encapsulation
class Account {
public:
float withdraw();
void deposit(float amount);
private:
float balance;
);
Advantages of Encapsulation
Protection
Consistency
Allows change
Objects and Classes
Classes reflect concepts, objects reflect
instances that embody those concepts.
Daria Jane BrittanyJodie
girlclassobject
Objects and Classes cont’d
A class captures the common
properties of the objects instantiated
from it
A class characterizes the common
behavior of all the objects that are its
instances
Objects and Classes cont’d
Class BankAccount
Balance
InterestYTD
Owner
Account_number
Balance 500
InterestYTD
Owner
Account_number
Balance 10,000
InterestYTD
Owner
Account_number
Operations
MakeDesposit
Transfer
WithDraw
GetBalance
Objects as instances of Classes
The world conceptually consists of objects
Many objects can be said to be of the same
type or class
 My bank account, your bank account, Bill Gates’
bank account …
We call the object type a class
Instantiation
An Object is instantiated from a Class
BankAccount myAccount;
myAccount = new BankAccount;
Objects and Classes
Class
 Visible in source
code
 The code is not
duplicated
Object
 Own copy of data
 Active in running
program
 Occupies memory
 Has the set of
operations given in
the class
Classification
Mammal
Rodent Primate Cats
Reptile
Animal
Squirel RabbitMouse
Classification
Enjoy a variety of personal banking options from First American. The following
outlines a number of First American products. If you have any questions, please
visit any First American Branch or contact us.
Checking
•Bank a lot without spending a lot: ValueFirst® Checking.
•Few checks and prefer PC Banking or ATMs: Select Access.
•Earn interest on checking dollars: First Interest Checking
•You are 55 years or better: 55 & Better Silver
•Premium checking features with higher interest rates than a personal checking account: First
American Platinum Checking
•Write less than 10 checks per month, or bank through an ATM: Budget Checking.
•Younger than 24 years old and in school: Student Checking
•Less than 20 transactions per month (excluding ATM, POS, and CheckCard): First Account
•Make the most out of every dollar: Tailored Money Sweep
Classification
Checking Account
Value First Select Access First Interest
Savings Account
Account
Inheritance
A class which is a subtype of a more
general class is said to be inherited
from it.
The sub-class inherits the base class’
data members and member functions
Inheritance cont’d
A sub-class has all data members of its
base-class plus its own
A sub-class has all member functions of
its base class (with changes) plus its
own
Inheritance is meant to implement sub-
typing (don’t abuse it)
Abstraction
Management of complexity
Hierarchical classification:
is-a relationship: inheritance
has-a relationship: containment
Polymorphism
One interface
Multiple implementations
Inheritance
Method overloading
What is a good class ?
A class abstracts objects
A class should be non-trivial in the
context of the program (has data
structures and operations different from
other classes)
Summary
What is Object Oriented Programming?
Object-oriented programming is a method of
implementation in which programs are
organized as cooperative collections of
objects, each of which represents an instance
of some class, and whose classes are all
members of one or more hierarchy of classes
united via inheritance relationships
Ad

More Related Content

What's hot (20)

ER-Model-ER Diagram
ER-Model-ER DiagramER-Model-ER Diagram
ER-Model-ER Diagram
Saranya Natarajan
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oop
colleges
 
Principles and advantages of oop ppt
Principles and advantages of oop pptPrinciples and advantages of oop ppt
Principles and advantages of oop ppt
daxesh chauhan
 
Classes, objects in JAVA
Classes, objects in JAVAClasses, objects in JAVA
Classes, objects in JAVA
Abhilash Nair
 
OOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOPOOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOP
Mudasir Qazi
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQL
rehaniltifat
 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
Alok Kumar
 
CORBA
CORBACORBA
CORBA
Mokshada Nayak
 
Java OOP Concept
Java OOP ConceptJava OOP Concept
Java OOP Concept
NikitaGour5
 
Basic concept of OOP's
Basic concept of OOP'sBasic concept of OOP's
Basic concept of OOP's
Prof. Dr. K. Adisesha
 
16 virtual function
16 virtual function16 virtual function
16 virtual function
Docent Education
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
Pooja mittal
 
Ado.Net Tutorial
Ado.Net TutorialAdo.Net Tutorial
Ado.Net Tutorial
prabhu rajendran
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP concepts
Ahmed Farag
 
Threads And Synchronization in C#
Threads And Synchronization in C#Threads And Synchronization in C#
Threads And Synchronization in C#
Rizwan Ali
 
Basic concepts of oops
Basic concepts of oopsBasic concepts of oops
Basic concepts of oops
Chandrakiran Satdeve
 
object oriented Programming ppt
object oriented Programming pptobject oriented Programming ppt
object oriented Programming ppt
Nitesh Dubey
 
Namespaces in C#
Namespaces in C#Namespaces in C#
Namespaces in C#
yogita kachve
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
Raghuveer Guthikonda
 
Cohesion and coupling
Cohesion and couplingCohesion and coupling
Cohesion and coupling
Aprajita (Abbey) Singh
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oop
colleges
 
Principles and advantages of oop ppt
Principles and advantages of oop pptPrinciples and advantages of oop ppt
Principles and advantages of oop ppt
daxesh chauhan
 
Classes, objects in JAVA
Classes, objects in JAVAClasses, objects in JAVA
Classes, objects in JAVA
Abhilash Nair
 
OOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOPOOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOP
Mudasir Qazi
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQL
rehaniltifat
 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
Alok Kumar
 
Java OOP Concept
Java OOP ConceptJava OOP Concept
Java OOP Concept
NikitaGour5
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
Pooja mittal
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP concepts
Ahmed Farag
 
Threads And Synchronization in C#
Threads And Synchronization in C#Threads And Synchronization in C#
Threads And Synchronization in C#
Rizwan Ali
 
object oriented Programming ppt
object oriented Programming pptobject oriented Programming ppt
object oriented Programming ppt
Nitesh Dubey
 

Viewers also liked (20)

Data Mining and WareHousing
Data Mining and WareHousingData Mining and WareHousing
Data Mining and WareHousing
Vishakha Agarwal
 
Odd Man Out and Series By Raju Makwana
Odd Man Out and Series By Raju MakwanaOdd Man Out and Series By Raju Makwana
Odd Man Out and Series By Raju Makwana
RAJU MAKWANA
 
SEO Presentation
SEO PresentationSEO Presentation
SEO Presentation
RAJU MAKWANA
 
BRAIN GATE
BRAIN GATEBRAIN GATE
BRAIN GATE
Vishakha Agarwal
 
Characteristics of oop
Characteristics of oopCharacteristics of oop
Characteristics of oop
Rasim Izhar Ali
 
Nano med bot technology by manish myst ssgbcoet
Nano med bot technology by manish myst ssgbcoetNano med bot technology by manish myst ssgbcoet
Nano med bot technology by manish myst ssgbcoet
Manish Myst
 
Space Mouse_Krishna Raj
Space Mouse_Krishna RajSpace Mouse_Krishna Raj
Space Mouse_Krishna Raj
Krishna Raj .S
 
Project presentation image compression by manish myst, ssgbcoet
Project presentation image compression by manish myst, ssgbcoetProject presentation image compression by manish myst, ssgbcoet
Project presentation image compression by manish myst, ssgbcoet
Manish Myst
 
15067420 space-mouse-rahul-raj
15067420 space-mouse-rahul-raj15067420 space-mouse-rahul-raj
15067420 space-mouse-rahul-raj
Srishti Sabharwal
 
Space mouse sameer kumar telikicherla
Space mouse   sameer kumar telikicherlaSpace mouse   sameer kumar telikicherla
Space mouse sameer kumar telikicherla
Sameer Telikicherla
 
Space mouse And Space Mouse Pro
Space mouse And Space Mouse ProSpace mouse And Space Mouse Pro
Space mouse And Space Mouse Pro
Vishakha Agarwal
 
Practical OOP In Java
Practical OOP In JavaPractical OOP In Java
Practical OOP In Java
wiradikusuma
 
Slide for space mouse by manish myst, ssgbcoet
Slide for space mouse by manish myst, ssgbcoetSlide for space mouse by manish myst, ssgbcoet
Slide for space mouse by manish myst, ssgbcoet
Manish Myst
 
Final ppt
Final pptFinal ppt
Final ppt
pramada
 
pill camera
pill camerapill camera
pill camera
nidhin999
 
SKYBUS TECHNOLOGY
SKYBUS TECHNOLOGYSKYBUS TECHNOLOGY
SKYBUS TECHNOLOGY
INDUSTRIAL ENGINEERING
 
Space Mouse
Space MouseSpace Mouse
Space Mouse
RAJU MAKWANA
 
Sky bus
Sky busSky bus
Sky bus
JNTU
 
My seminar ppt SPACE MOUSE
My seminar ppt  SPACE MOUSEMy seminar ppt  SPACE MOUSE
My seminar ppt SPACE MOUSE
Sudeep Kumar
 
Pill camera ppt
Pill camera pptPill camera ppt
Pill camera ppt
sudheer sandy
 
Data Mining and WareHousing
Data Mining and WareHousingData Mining and WareHousing
Data Mining and WareHousing
Vishakha Agarwal
 
Odd Man Out and Series By Raju Makwana
Odd Man Out and Series By Raju MakwanaOdd Man Out and Series By Raju Makwana
Odd Man Out and Series By Raju Makwana
RAJU MAKWANA
 
Nano med bot technology by manish myst ssgbcoet
Nano med bot technology by manish myst ssgbcoetNano med bot technology by manish myst ssgbcoet
Nano med bot technology by manish myst ssgbcoet
Manish Myst
 
Space Mouse_Krishna Raj
Space Mouse_Krishna RajSpace Mouse_Krishna Raj
Space Mouse_Krishna Raj
Krishna Raj .S
 
Project presentation image compression by manish myst, ssgbcoet
Project presentation image compression by manish myst, ssgbcoetProject presentation image compression by manish myst, ssgbcoet
Project presentation image compression by manish myst, ssgbcoet
Manish Myst
 
15067420 space-mouse-rahul-raj
15067420 space-mouse-rahul-raj15067420 space-mouse-rahul-raj
15067420 space-mouse-rahul-raj
Srishti Sabharwal
 
Space mouse sameer kumar telikicherla
Space mouse   sameer kumar telikicherlaSpace mouse   sameer kumar telikicherla
Space mouse sameer kumar telikicherla
Sameer Telikicherla
 
Space mouse And Space Mouse Pro
Space mouse And Space Mouse ProSpace mouse And Space Mouse Pro
Space mouse And Space Mouse Pro
Vishakha Agarwal
 
Practical OOP In Java
Practical OOP In JavaPractical OOP In Java
Practical OOP In Java
wiradikusuma
 
Slide for space mouse by manish myst, ssgbcoet
Slide for space mouse by manish myst, ssgbcoetSlide for space mouse by manish myst, ssgbcoet
Slide for space mouse by manish myst, ssgbcoet
Manish Myst
 
Final ppt
Final pptFinal ppt
Final ppt
pramada
 
Sky bus
Sky busSky bus
Sky bus
JNTU
 
My seminar ppt SPACE MOUSE
My seminar ppt  SPACE MOUSEMy seminar ppt  SPACE MOUSE
My seminar ppt SPACE MOUSE
Sudeep Kumar
 
Ad

Similar to Object Oriented Programming (20)

Oops
OopsOops
Oops
poonamchopra7975
 
Lecture20-Object-Based-Programming-Nov18-2018.pptx
Lecture20-Object-Based-Programming-Nov18-2018.pptxLecture20-Object-Based-Programming-Nov18-2018.pptx
Lecture20-Object-Based-Programming-Nov18-2018.pptx
Mohammad Akbari
 
Introduction to-ddd
Introduction to-dddIntroduction to-ddd
Introduction to-ddd
John Ferguson Smart Limited
 
Hitchhiker systems deepdive
Hitchhiker systems deepdiveHitchhiker systems deepdive
Hitchhiker systems deepdive
Duncan Jones
 
Banks offer various types of accounts, such as savings, checking, cer.pdf
 Banks offer various types of accounts, such as savings, checking, cer.pdf Banks offer various types of accounts, such as savings, checking, cer.pdf
Banks offer various types of accounts, such as savings, checking, cer.pdf
akbsingh1313
 
Defining tasks for User Stories
Defining tasks for User StoriesDefining tasks for User Stories
Defining tasks for User Stories
Martin Lapointe, M.T.I.
 
CSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docx
CSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docxCSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docx
CSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docx
ruthannemcmullen
 
Requirements in Agile Projects (Brief Intro), by Razvan Radulian (RTPIIBA, 20...
Requirements in Agile Projects (Brief Intro), by Razvan Radulian (RTPIIBA, 20...Requirements in Agile Projects (Brief Intro), by Razvan Radulian (RTPIIBA, 20...
Requirements in Agile Projects (Brief Intro), by Razvan Radulian (RTPIIBA, 20...
Why-What-How Consulting, LLC
 
Behavior Driven Development [10] - Software Testing Techniques (CIS640)
Behavior Driven Development [10] - Software Testing Techniques (CIS640)Behavior Driven Development [10] - Software Testing Techniques (CIS640)
Behavior Driven Development [10] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 
Commercial Banking - Challenges and Opportunities
Commercial Banking - Challenges and OpportunitiesCommercial Banking - Challenges and Opportunities
Commercial Banking - Challenges and Opportunities
Shihab Khalil
 
AIPPTMaker_Personal Asset Management System with Java OOP and JDBC (1).pptx
AIPPTMaker_Personal Asset Management System with Java OOP and JDBC (1).pptxAIPPTMaker_Personal Asset Management System with Java OOP and JDBC (1).pptx
AIPPTMaker_Personal Asset Management System with Java OOP and JDBC (1).pptx
rikkukr27
 
Wise-Sync - Upside Down Accounting
Wise-Sync - Upside Down AccountingWise-Sync - Upside Down Accounting
Wise-Sync - Upside Down Accounting
Paul MacNeill
 
Hitchhiker systems
Hitchhiker systemsHitchhiker systems
Hitchhiker systems
Duncan Jones
 
Kodas ir specifikacija: du zuikiai vienu šūviu
Kodas ir specifikacija: du zuikiai vienu šūviuKodas ir specifikacija: du zuikiai vienu šūviu
Kodas ir specifikacija: du zuikiai vienu šūviu
Agile Lietuva
 
Library Windows Project
Library Windows ProjectLibrary Windows Project
Library Windows Project
Rick Massouh
 
On-chain Crowdfunding & Asset Token
On-chain Crowdfunding & Asset Token On-chain Crowdfunding & Asset Token
On-chain Crowdfunding & Asset Token
Priyab Satoshi
 
Introduction to Domain driven design (LaravelBA #5)
Introduction to Domain driven design (LaravelBA #5)Introduction to Domain driven design (LaravelBA #5)
Introduction to Domain driven design (LaravelBA #5)
guiwoda
 
Ideal online bank
Ideal online bankIdeal online bank
Ideal online bank
szrehman
 
ch_5.pdf
ch_5.pdfch_5.pdf
ch_5.pdf
ICAIChandigarhBranch
 
Best School Management Sotwares
Best School Management SotwaresBest School Management Sotwares
Best School Management Sotwares
ebiharportal
 
Lecture20-Object-Based-Programming-Nov18-2018.pptx
Lecture20-Object-Based-Programming-Nov18-2018.pptxLecture20-Object-Based-Programming-Nov18-2018.pptx
Lecture20-Object-Based-Programming-Nov18-2018.pptx
Mohammad Akbari
 
Hitchhiker systems deepdive
Hitchhiker systems deepdiveHitchhiker systems deepdive
Hitchhiker systems deepdive
Duncan Jones
 
Banks offer various types of accounts, such as savings, checking, cer.pdf
 Banks offer various types of accounts, such as savings, checking, cer.pdf Banks offer various types of accounts, such as savings, checking, cer.pdf
Banks offer various types of accounts, such as savings, checking, cer.pdf
akbsingh1313
 
CSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docx
CSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docxCSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docx
CSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docx
ruthannemcmullen
 
Requirements in Agile Projects (Brief Intro), by Razvan Radulian (RTPIIBA, 20...
Requirements in Agile Projects (Brief Intro), by Razvan Radulian (RTPIIBA, 20...Requirements in Agile Projects (Brief Intro), by Razvan Radulian (RTPIIBA, 20...
Requirements in Agile Projects (Brief Intro), by Razvan Radulian (RTPIIBA, 20...
Why-What-How Consulting, LLC
 
Behavior Driven Development [10] - Software Testing Techniques (CIS640)
Behavior Driven Development [10] - Software Testing Techniques (CIS640)Behavior Driven Development [10] - Software Testing Techniques (CIS640)
Behavior Driven Development [10] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 
Commercial Banking - Challenges and Opportunities
Commercial Banking - Challenges and OpportunitiesCommercial Banking - Challenges and Opportunities
Commercial Banking - Challenges and Opportunities
Shihab Khalil
 
AIPPTMaker_Personal Asset Management System with Java OOP and JDBC (1).pptx
AIPPTMaker_Personal Asset Management System with Java OOP and JDBC (1).pptxAIPPTMaker_Personal Asset Management System with Java OOP and JDBC (1).pptx
AIPPTMaker_Personal Asset Management System with Java OOP and JDBC (1).pptx
rikkukr27
 
Wise-Sync - Upside Down Accounting
Wise-Sync - Upside Down AccountingWise-Sync - Upside Down Accounting
Wise-Sync - Upside Down Accounting
Paul MacNeill
 
Hitchhiker systems
Hitchhiker systemsHitchhiker systems
Hitchhiker systems
Duncan Jones
 
Kodas ir specifikacija: du zuikiai vienu šūviu
Kodas ir specifikacija: du zuikiai vienu šūviuKodas ir specifikacija: du zuikiai vienu šūviu
Kodas ir specifikacija: du zuikiai vienu šūviu
Agile Lietuva
 
Library Windows Project
Library Windows ProjectLibrary Windows Project
Library Windows Project
Rick Massouh
 
On-chain Crowdfunding & Asset Token
On-chain Crowdfunding & Asset Token On-chain Crowdfunding & Asset Token
On-chain Crowdfunding & Asset Token
Priyab Satoshi
 
Introduction to Domain driven design (LaravelBA #5)
Introduction to Domain driven design (LaravelBA #5)Introduction to Domain driven design (LaravelBA #5)
Introduction to Domain driven design (LaravelBA #5)
guiwoda
 
Ideal online bank
Ideal online bankIdeal online bank
Ideal online bank
szrehman
 
Best School Management Sotwares
Best School Management SotwaresBest School Management Sotwares
Best School Management Sotwares
ebiharportal
 
Ad

Recently uploaded (20)

DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
CSUC - Consorci de Serveis Universitaris de Catalunya
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptxWebinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
MSP360
 
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Raffi Khatchadourian
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and MLGyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
Gyrus AI
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptxWebinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
MSP360
 
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Raffi Khatchadourian
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and MLGyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
Gyrus AI
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 

Object Oriented Programming

  • 2. Problem Description “ …customers are allowed to have different types of bank accounts, deposit money, withdraw money and transfer money between accounts”
  • 3. Procedural Approach bool MakeDeposit(int accountNum,float amount); float Withdraw(int accountNum,float amount); struct Account { char *name; int accountNum; float balance; char accountType; };
  • 4. Procedural Approach cont’d Focus is on procedures All data is shared: no protection More difficult to modify Hard to manage complexity
  • 5. Procedural vs. Object-Oriented Procedural Withdraw, deposit, transfer Object Oriented Customer, money, account
  • 6. Mapping the world to software Objects in the problem domain are mapped to objects in software
  • 7. Object Oriented Data and operations are grouped together Account Withdraw Deposit Transfer Interface: Set of available operations
  • 8. Data Encapsulation class Account { public: float withdraw(); void deposit(float amount); private: float balance; );
  • 10. Objects and Classes Classes reflect concepts, objects reflect instances that embody those concepts. Daria Jane BrittanyJodie girlclassobject
  • 11. Objects and Classes cont’d A class captures the common properties of the objects instantiated from it A class characterizes the common behavior of all the objects that are its instances
  • 12. Objects and Classes cont’d Class BankAccount Balance InterestYTD Owner Account_number Balance 500 InterestYTD Owner Account_number Balance 10,000 InterestYTD Owner Account_number Operations MakeDesposit Transfer WithDraw GetBalance
  • 13. Objects as instances of Classes The world conceptually consists of objects Many objects can be said to be of the same type or class  My bank account, your bank account, Bill Gates’ bank account … We call the object type a class
  • 14. Instantiation An Object is instantiated from a Class BankAccount myAccount; myAccount = new BankAccount;
  • 15. Objects and Classes Class  Visible in source code  The code is not duplicated Object  Own copy of data  Active in running program  Occupies memory  Has the set of operations given in the class
  • 17. Classification Enjoy a variety of personal banking options from First American. The following outlines a number of First American products. If you have any questions, please visit any First American Branch or contact us. Checking •Bank a lot without spending a lot: ValueFirst® Checking. •Few checks and prefer PC Banking or ATMs: Select Access. •Earn interest on checking dollars: First Interest Checking •You are 55 years or better: 55 & Better Silver •Premium checking features with higher interest rates than a personal checking account: First American Platinum Checking •Write less than 10 checks per month, or bank through an ATM: Budget Checking. •Younger than 24 years old and in school: Student Checking •Less than 20 transactions per month (excluding ATM, POS, and CheckCard): First Account •Make the most out of every dollar: Tailored Money Sweep
  • 18. Classification Checking Account Value First Select Access First Interest Savings Account Account
  • 19. Inheritance A class which is a subtype of a more general class is said to be inherited from it. The sub-class inherits the base class’ data members and member functions
  • 20. Inheritance cont’d A sub-class has all data members of its base-class plus its own A sub-class has all member functions of its base class (with changes) plus its own Inheritance is meant to implement sub- typing (don’t abuse it)
  • 21. Abstraction Management of complexity Hierarchical classification: is-a relationship: inheritance has-a relationship: containment
  • 23. What is a good class ? A class abstracts objects A class should be non-trivial in the context of the program (has data structures and operations different from other classes)
  • 24. Summary What is Object Oriented Programming? Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which represents an instance of some class, and whose classes are all members of one or more hierarchy of classes united via inheritance relationships
  翻译: