Computer scienceProgramming languagesC++Basics of object-oriented programming

Constructors and destructors

Bank account management

Report a typo

Design a C++ class BankAccount that encapsulates the information of a bank account.

Typically, a bank account needs to store the following information:

  • Owner's name (name)

  • Amount of money (balance)

  • Currency (string) (currency)

You also need to implement parameterized constructor and getters.

Sample Input 1:

John 1000 USD

Sample Output 1:

John
1000
USD
Write a program in C++





Create a free account to access the full topic