






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A lecture note from cse294b, object-oriented c++ programming for engineers, focusing on the concept of objects and classes using the example of a bank account. The lecture covers the minimum requirements to operate a car as an object analogy, the difference between objects and classes, the data and functions associated with a bank account object, and access specifiers in c++ for encapsulation. The document also includes a simple bank_account class implementation and a call to action for a programming exercise.
Typology: Study notes
1 / 10
This page cannot be seen from the preview
Don't miss anything!
-^
-^
d i
d^
k^
b^
h^
d^
d
know to be able to drive the car
-^
what
the function
will do, but does not need to know
how
it does it
What is the data that is associated with a bank account?–
NameA
t N
b
-^
Account Number
-^
Balance
-^
PIN
What are the functions that can be performed on a bankaccount?
Deposit
-^
Deposit
-^
Withdrawal
-^
Transfer
-^
Check Balance
-^
Change PIN
There are two access specifiers in C++–
public
i^
t
-^
private
If a variable or function is declared public, any other pieceof code can access the variable or function
-^
If a variable or function is declared private, only the classin which that variable or function is declared can access it
l^
f^
h^
b^
id
h^
d^
d^
h
Rule of Thumb – Hide the data and expose the necessaryfunctions