Write a C++ Program in which a class name Bank contains Name, account_number and balance as a data members andthe class also has the following member functions: OpenAccount( )– It will take input account_number, name and opening balance. ShowAccount( )– It will display the account details such as account_number, name and balance. Deposit ( )– It will ask for the amount to be added in available balance, and deposit the amount. Withdrawal( )– It will ask for the amount to be withdrawn from the available balance, will also check the available balance, if balance is available, it will deduct the amount from the available balance. Search( )– It will search for the record and display the account information.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter11: Introduction To Classes
Section11.2: Basic Class Functions
Problem 5E
icon
Related questions
Question

Write a C++ Program in which a class name Bank contains Name, account_number and balance as a data members andthe class also has the following member functions:

  • OpenAccount( )– It will take input account_number, name and opening balance.
  • ShowAccount( )– It will display the account details such as account_number, name and balance.
  • Deposit ( )– It will ask for the amount to be added in available balance, and deposit the amount.
  • Withdrawal( )– It will ask for the amount to be withdrawn from the available balance, will also check the available balance, if balance is available, it will deduct the amount from the available balance.
  • Search( )– It will search for the record and display the account information.

 

For Example: You will insert at least three account information i.e. Account number, Your Name&Balanceas shown in the Output 1 below. Than Search the account information with different options as shown in the Output 2.

 1) Display all:

  • Using this option it will printall record of user accounts i.e. Account number, Your Name&Balance as shown in the Output 3.

2) ByAccount No:

  •  
  • Using this option it will print only the Specific Account Information with the help of Account No as shown in the Output 4. It will ask your account number to display.

3) Deposit:

  •  
  • Using this option it will ask you to enteraccount number and then the amount you want to deposit in it as shown in the Output 5.

4) Withdraw:

  • Using this option it will first ask you to enter youraccount number so it will display the account information after that it will request you to enter the amount you want to withdraw as shown in the Output 6.

5) Exit:

  • Exit Option will terminate the program.
Expert Solution
steps

Step by step

Solved in 3 steps with 10 images

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,