SlideShare una empresa de Scribd logo
1 de 24
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

Más contenido relacionado

La actualidad más candente

[OOP - Lec 19] Static Member Functions
[OOP - Lec 19] Static Member Functions[OOP - Lec 19] Static Member Functions
[OOP - Lec 19] Static Member FunctionsMuhammad Hammad Waseem
 
Properties and indexers in C#
Properties and indexers in C#Properties and indexers in C#
Properties and indexers in C#Hemant Chetwani
 
Introduction to class in java
Introduction to class in javaIntroduction to class in java
Introduction to class in javakamal kotecha
 
Object-Oriented Programming Concepts
Object-Oriented Programming ConceptsObject-Oriented Programming Concepts
Object-Oriented Programming ConceptsKwangshin Oh
 
Procedural vs. object oriented programming
Procedural vs. object oriented programmingProcedural vs. object oriented programming
Procedural vs. object oriented programmingHaris Bin Zahid
 
Data Type Conversion in C++
Data Type Conversion in C++Data Type Conversion in C++
Data Type Conversion in C++Danial Mirza
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++Vishal Patil
 
CSharp Presentation
CSharp PresentationCSharp Presentation
CSharp PresentationVishwa Mohan
 
friend function(c++)
friend function(c++)friend function(c++)
friend function(c++)Ritika Sharma
 
class and objects
class and objectsclass and objects
class and objectsPayel Guria
 
Templates in C++
Templates in C++Templates in C++
Templates in C++Tech_MX
 
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...Simplilearn
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingMoutaz Haddara
 
Super keyword in java
Super keyword in javaSuper keyword in java
Super keyword in javaHitesh Kumar
 

La actualidad más candente (20)

Inheritance in OOPS
Inheritance in OOPSInheritance in OOPS
Inheritance in OOPS
 
[OOP - Lec 19] Static Member Functions
[OOP - Lec 19] Static Member Functions[OOP - Lec 19] Static Member Functions
[OOP - Lec 19] Static Member Functions
 
07. Virtual Functions
07. Virtual Functions07. Virtual Functions
07. Virtual Functions
 
Properties and indexers in C#
Properties and indexers in C#Properties and indexers in C#
Properties and indexers in C#
 
Introduction to class in java
Introduction to class in javaIntroduction to class in java
Introduction to class in java
 
Object-Oriented Programming Concepts
Object-Oriented Programming ConceptsObject-Oriented Programming Concepts
Object-Oriented Programming Concepts
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Procedural vs. object oriented programming
Procedural vs. object oriented programmingProcedural vs. object oriented programming
Procedural vs. object oriented programming
 
Data Type Conversion in C++
Data Type Conversion in C++Data Type Conversion in C++
Data Type Conversion in C++
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
 
This pointer
This pointerThis pointer
This pointer
 
CSharp Presentation
CSharp PresentationCSharp Presentation
CSharp Presentation
 
friend function(c++)
friend function(c++)friend function(c++)
friend function(c++)
 
Data types in java
Data types in javaData types in java
Data types in java
 
class and objects
class and objectsclass and objects
class and objects
 
Templates in C++
Templates in C++Templates in C++
Templates in C++
 
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
 
Python oop third class
Python oop   third classPython oop   third class
Python oop third class
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Super keyword in java
Super keyword in javaSuper keyword in java
Super keyword in java
 

Destacado

Data Mining and WareHousing
Data Mining and WareHousingData Mining and WareHousing
Data Mining and WareHousingVishakha 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 MakwanaRAJU 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 ssgbcoetManish Myst
 
Space Mouse_Krishna Raj
Space Mouse_Krishna RajSpace Mouse_Krishna Raj
Space Mouse_Krishna RajKrishna 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, ssgbcoetManish Myst
 
15067420 space-mouse-rahul-raj
15067420 space-mouse-rahul-raj15067420 space-mouse-rahul-raj
15067420 space-mouse-rahul-rajSrishti Sabharwal
 
Space mouse sameer kumar telikicherla
Space mouse   sameer kumar telikicherlaSpace mouse   sameer kumar telikicherla
Space mouse sameer kumar telikicherlaSameer Telikicherla
 
Space mouse And Space Mouse Pro
Space mouse And Space Mouse ProSpace mouse And Space Mouse Pro
Space mouse And Space Mouse ProVishakha Agarwal
 
Practical OOP In Java
Practical OOP In JavaPractical OOP In Java
Practical OOP In Javawiradikusuma
 
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, ssgbcoetManish Myst
 
Final ppt
Final pptFinal ppt
Final pptpramada
 
Sky bus
Sky busSky bus
Sky busJNTU
 
My seminar ppt SPACE MOUSE
My seminar ppt  SPACE MOUSEMy seminar ppt  SPACE MOUSE
My seminar ppt SPACE MOUSESudeep Kumar
 

Destacado (20)

Data Mining and WareHousing
Data Mining and WareHousingData Mining and WareHousing
Data Mining and WareHousing
 
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
 
SEO Presentation
SEO PresentationSEO Presentation
SEO Presentation
 
BRAIN GATE
BRAIN GATEBRAIN GATE
BRAIN GATE
 
Characteristics of oop
Characteristics of oopCharacteristics of oop
Characteristics of oop
 
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
 
Space Mouse_Krishna Raj
Space Mouse_Krishna RajSpace Mouse_Krishna Raj
Space Mouse_Krishna Raj
 
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
 
15067420 space-mouse-rahul-raj
15067420 space-mouse-rahul-raj15067420 space-mouse-rahul-raj
15067420 space-mouse-rahul-raj
 
Space mouse sameer kumar telikicherla
Space mouse   sameer kumar telikicherlaSpace mouse   sameer kumar telikicherla
Space mouse sameer kumar telikicherla
 
Space mouse And Space Mouse Pro
Space mouse And Space Mouse ProSpace mouse And Space Mouse Pro
Space mouse And Space Mouse Pro
 
Practical OOP In Java
Practical OOP In JavaPractical OOP In Java
Practical OOP In Java
 
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
 
Final ppt
Final pptFinal ppt
Final ppt
 
pill camera
pill camerapill camera
pill camera
 
SKYBUS TECHNOLOGY
SKYBUS TECHNOLOGYSKYBUS TECHNOLOGY
SKYBUS TECHNOLOGY
 
Space Mouse
Space MouseSpace Mouse
Space Mouse
 
Sky bus
Sky busSky bus
Sky bus
 
My seminar ppt SPACE MOUSE
My seminar ppt  SPACE MOUSEMy seminar ppt  SPACE MOUSE
My seminar ppt SPACE MOUSE
 
Pill camera ppt
Pill camera pptPill camera ppt
Pill camera ppt
 

Similar a Object Oriented Programming

Hitchhiker systems deepdive
Hitchhiker systems deepdiveHitchhiker systems deepdive
Hitchhiker systems deepdiveDuncan 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.pdfakbsingh1313
 
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.docxruthannemcmullen
 
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 OpportunitiesShihab Khalil
 
Wise-Sync - Upside Down Accounting
Wise-Sync - Upside Down AccountingWise-Sync - Upside Down Accounting
Wise-Sync - Upside Down AccountingPaul MacNeill
 
Hitchhiker systems
Hitchhiker systemsHitchhiker systems
Hitchhiker systemsDuncan 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 šūviuAgile Lietuva
 
Library Windows Project
Library Windows ProjectLibrary Windows Project
Library Windows ProjectRick 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 bankszrehman
 
Best School Management Sotwares
Best School Management SotwaresBest School Management Sotwares
Best School Management Sotwaresebiharportal
 
Ideal Online Banks
Ideal Online BanksIdeal Online Banks
Ideal Online Banksszrehman
 

Similar a Object Oriented Programming (20)

Oops
OopsOops
Oops
 
Introduction to-ddd
Introduction to-dddIntroduction to-ddd
Introduction to-ddd
 
Hitchhiker systems deepdive
Hitchhiker systems deepdiveHitchhiker systems deepdive
Hitchhiker systems deepdive
 
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
 
Defining tasks for User Stories
Defining tasks for User StoriesDefining tasks for User Stories
Defining tasks for User Stories
 
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
 
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...
 
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)
 
Commercial Banking - Challenges and Opportunities
Commercial Banking - Challenges and OpportunitiesCommercial Banking - Challenges and Opportunities
Commercial Banking - Challenges and Opportunities
 
Wise-Sync - Upside Down Accounting
Wise-Sync - Upside Down AccountingWise-Sync - Upside Down Accounting
Wise-Sync - Upside Down Accounting
 
Hitchhiker systems
Hitchhiker systemsHitchhiker systems
Hitchhiker systems
 
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
 
Library Windows Project
Library Windows ProjectLibrary Windows Project
Library Windows Project
 
On-chain Crowdfunding & Asset Token
On-chain Crowdfunding & Asset Token On-chain Crowdfunding & Asset Token
On-chain Crowdfunding & Asset Token
 
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)
 
Ideal online bank
Ideal online bankIdeal online bank
Ideal online bank
 
ch_5.pdf
ch_5.pdfch_5.pdf
ch_5.pdf
 
Best School Management Sotwares
Best School Management SotwaresBest School Management Sotwares
Best School Management Sotwares
 
Seq uml
Seq umlSeq uml
Seq uml
 
Ideal Online Banks
Ideal Online BanksIdeal Online Banks
Ideal Online Banks
 

Último

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Último (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

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