Question: Use the following class declaration - class BankAccount{private: string name; double balance; public: BankAccount(); BankAccount(string n, double b); double getBalance(); bool deposit(double amt); bool withdraw(double

Use the following class declaration -

class BankAccount{private: string name; double balance; public: BankAccount(); BankAccount(string n, double b); double getBalance(); bool deposit(double amt); bool withdraw(double amt); void showAccountInfo();};

In main() create a demonstration program that lets you manage a single Bank Account. Asimple loop that defines and uses a bank account object with a simple menu is adequate.A. DepositB. WithdrawalC. Show Account InfoQ. Quit Your deposit and withdraw member functions should include basic validation (depositand withdraw amounts should be greater than zero, and withdraw amount should be lessthan or equal to the balance). The recommended class function implementation for this isto return TRUE if the transaction is valid, and FALSE if its not. For example thefollowing code in main would make sense

if (deposit(amount)) cout<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!