Zookal
Zookal

We’d love to hear any feedback or comment from you!

© 2011-2021 Zookal Pty Ltd

View question and answer

From our collection of questions and answers
Engineering · Computer Science
Question details

bankAccount polymorphisnm Create from scratch or modify week 2 program as follows bankAccount - The bankAccount class will be abstract in this assignment and will use virtual and ure virtual functions Data accountNumber name balance Methods getAccountNumber getBalance getName setName deposit withdraw (virtual) print (virtual) reateM Statement (pure vi Constructor sets account number set account holder name sets account balance Note Print)- displays the account number and balance Derive class checkingAccount from base class bankAccount. The checkingAccount class should define a checkingAccount Data interestRate minimumBalance serviceCharge Methods getMinimumBalance setMinimumBalance getInterestRate setinterestRate getServiceCharge setServiceCharge postInterest writeCheck withdravw print createMonthlvStatement ее Constructor: sets account holder name sets account number sets account balance sets minimum balance set interest rate sets service charge amount sets amount of monthly fee NOTES postlnterest takes the interest amount based off of the total balance and adds it to the balance (balance + balance interestRate) writeCheck calls withdraw withdraw checks to make sure there is enough money in the account first and reports a warning if not. If there is enough money to make the withdraw, it then checks to see if the balance will go below the minimum amount after the withdraw. If so, it checks to see if the balance will go below zero after the withdraw and the service charge is applied. Should this occur an error is reported. If not, the balance is adjust to reflect the withdraw and the service charge applied createMonthlyStatement this posts the interest (calls postlnterest)) and deducts the monthly fee from the balance

Print uses the base class print and then also prints the interest rate Derive class savingsAccount from base class bankAccount. The savingsAccount class should define and implement the following data and methods savingsAccount Data interestRate Methods getInterestRate setInterestRate withdraw postInterest print createMonthlyStatement Constructor sets account holder name sets account number sets account balance set interest rate NOTES Withdraw checks to make sure there is enough money before altering the balance. warning message is printed and the balance remains unchanged Create monthly statement - this posts the interest to the account Print uses the base class print and then also prints the interest rarte If not, a Create a main program to test the class as follows. Use hard coded data (do not prompt the user for data, just make up values). define an array to hold 6 bankAccount classes. Perform these steps in order: store 3 new checking accounts and 3 new savings accounts in the array Print a January Header for all 6 accounts, create the monthly statement then print the account info print a February header for all 6 accounts, create the monthly statement then print the account info withdraw 500 for each account print a match header for all 6 accounts, create the monthly statement then print the account info The following is an example of a main program you can choose to use which meets the above requirements include ciostream> #include ciomanip> #include savingsAccount.h include checkingAccount.h using namespace std; int mainO accountsList[0] new o accountsList[]-new checkingAccountBob, 10210, 10000,100,0.0099,15.00); accountsList[2]-new savingsAccount Susan, 90001, 20000,0.031) accountsList 3]-new savingsAccount Steve, 90002, 50000,0.041); accountsList[4]-new checkingAccount Sally, 10220, 4999,100,0.0079,20.00); accountsList5]-ne savingsAccount Frad, 90003, 2000,0.011) Bill, 10200, 25000,100,0.012,10.00); cout Januaryn. for (int i-0; i <6;it+) <<endl; accountsList i]->createMonthlyStatementO; accountsListlj.>print0; cout endl;

cout<nFebruaryn for (int i-0; i #6; i++) <endl; accountsList[i >createMonthlyStatement0; cout < endl for (int i-0; i #6; i++) accountsList[il->withdraw(500); cout enMarch:.. for (int i = 0; i#6; i++) accountsList[i >createMonthlyStatement0; cout < endl retum Output can look similar to this January: Interest Checking ACCT#: Interest Checking ACCT#: Savings ACCT#: Savings ACCT#: Interest Checking ACCT#: Savings ACCT#: Februarv: 10200 balance : S2 5290.00 10210 balance : S10089.00 Interest Rate Interest Rate Interest Rate= 3.1096 Interest Rate= 4.1096 1.20% 0.99% 90001 balance : S20620.00 90002 balance : S52050.00 10220 balance : S5028.49 Interest Rate = 0.79% 90003 balance : S2022.00 Interest Rate 1.10% Interest Checking ACCT#: Interest Checking ACCT#: Savings ACCT#: Savings ACCT#: Interest Checking ACCT#: Savings ACCT#: March: 10200 balance : S25583.48 10210 balance : S101 78.88 Interest Rate Interest Rate 1.20% 0.99% 90001 balance : S2|259.22 Interest Rate= 3.1096 90002 balance: S54184.05 Interest Rate 4.10% 10220 balance : S5058·22 Interest Rate = 0.79% 90003 balance : S204424 Interest Rate 1.10% Interest Checking ACCT#: Interest Checking ACCT#: Savings ACCT#: Savings ACCT#: Interest Checking ACCT#: Savings ACCT#: 10200 balance : S25374.48 10210 balance : S9764.70 Interest Rate 1.20% Interest Rate = 0.99% 90001 balance: S21402.76 Interest Rate -3.10% 90002 balance : S55885·10 Interest Rate= 4.1096 10220 balance : S458423 Interest Rate = 0.79% 90003 balance : S1561.23 Interest Rate 1.10% Implementation Requirements You will create seven files for this assignment: bankAccount.h (base class definition) bankAccount.cpp (base class implementation) checkingAccount.h (checkingAccount definition) checkingAccount.cpp (checkingAccount implementation) savingsAccount.h (savingsAccount definition) savingsAccount.cpp (savingsAccount implementation) bankAccountTest.cpp (test file for your bankAccount class) Submit source code, a screenshot with a time stamp of code execution, and a text file of the code. All code should include comments.

Answer
Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.

Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.