Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DocViewer Page of 2 Pages Assignment 8 CSIS 1 1 3 A Duffie ( S 2 0 2 1 ) Use the following class declaration

DocViewer
Page
of 2
Pages
Assignment 8
CSIS 113A Duffie (S2021)
Use the following class declaration -
class BankAccount
{
private:
string customer_name;
int account_number;
double account_balance;
public:
BankAccount();
BankAccount(string name, int account, double balance);
double getBalance();
bool deposit(double amount);
bool withdraw(double amount);
void showAccountInfo();
};
In main() create a demonstration program that lets you manage a single Bank Account. A
simple loop that defines and uses a bank account object with a simple menu is adequate.
A. Deposit
B. Withdrawal
C. Show Account Info
Q. Quit
Deposit and Withdrawal menu options should prompt the user to input an amount to
deposit or withdraw. The deposit and withdraw member functions should validate the
transaction amount and update the balance. The showAccountInfo() member function
should display all account information (name, account number, and balance). Your
deposit and withdraw member functions should include basic validation (deposit and
withdraw amounts should be greater than zero, and withdraw amount should be less than
or equal to the balance). The recommended class function implementation for this is to
return TRUE if the transaction is valid, and FALSE if its not. For example the following
code in main would make sense
if (deposit(amount))
cout<<Success<

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions

Question

What are the role of supervisors ?

Answered: 1 week ago