Question: CIS 2 8 0 X Lab assignment 1 Due: Wednesday, January 1 7 1 0 points Implement a class Account. An account has a balance,
CIS X
Lab assignment
Due: Wednesday, January
points
Implement a class Account. An account has a balance, functions to add and withdraw money, and a function to query the current balance. Charge a $ penalty if an attempt is made to withdraw more money than is available in the account.
Test your Account class by using the following main function.
int main
Account myaccount; Set up my account with $
myaccount.deposit;
myaccount.withdraw; Penalty of $ will apply
myaccount.withdraw;
cout "Account balance: myaccount.getbalance
;
myaccount.withdrawmyaccount.getbalance; withdraw all
cout "Account balance: myaccount.getbalance
;
return ;
Output
Account balance:
Account balance:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
