Answered step by step
Verified Expert Solution
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
Pages
Assignment
CSIS A Duffie S
Use the following class declaration
class BankAccount
private:
string customername;
int accountnumber;
double accountbalance;
public:
BankAccount;
BankAccountstring name, int account, double balance;
double getBalance;
bool depositdouble amount;
bool withdrawdouble 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 depositamount
coutSuccess
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started