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

I am stumped with this for c++

bankAccount extended Create from scratch or modify week 1 bankAccount class. bankAccount Data accountNumber balance The class should define and implement the following data and methods: Methods setAccountNumber getAccountNumber getBalance withdravw deposit Constructor: sets account number sets account balance Derive class checkingAccount from base class bankAccount. The checkingAccount class should define and implement the following data and methods checkingAccount Data interestRate minimumBalance erviceCharge Methods getMinimumBalance setMinimumBalance getInterestRate setInterestRate getServiceCharge setServiceCharge postInterest writeCheck withdravw Constructor: sets account number sets account balance sets minimum balance set interest rate sets service charge amount 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 adjusted to reflect the withdraw and the service charge applied Derive class savinasAccount from base class bankAccount. The savingsAccount class should define and implement the following data and methods savingsAccount Data interestRate Methods getInterestRate setInterestRate withdraw postlnterest nt Constructor:

Derive class savingsAccount from base class bankAccount savingsAccount The savingsAccount class should define and implement the following data and methods Methods getInterestRate setInterestRate withdraw postInterest ata interestRate Constructor sets account number sets account balance set interest rate NOTES Withdraw checks to make sure there is enough money before altering the balance. If not, a warning message is printed and the balance remains unchanged 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). create 2 checking accounts and 2 savings accounts deposit money in each post interest in each print details of each write checks in the checking accounts withdraw from the savings accounts print details of each You may use the following main program to test your classes if you wish: #include <iostream> #include <iomanip> #:include savingsAccount.h #include checkingAccount.h using namespace int main0 Perform these steps in order: std; int accountNumber 1000 checking Account jackAccount accountNumber++,1000); checkingAccount lisaAccount(accountNumber++, 450); savingsAccount samirAccountlaccountNumber++, 9300) savings jackAccount.deposit(1000); lisaAccount.deposit(2300); samirAccount.deposit(800); ritaAccount.deposit(500); jackAccount postlnterestO: lisaAccount.postinterest0 samirAccount.postInterestO; ritaAccount.postinterestO cout <*** *<<endl; jackAccount.printO; lisaAccount print) samirAccount.print0: ritaAccount.printO; cout<<i*< endl << endl Account ritaAccount(accountN umber++, 32);

You may use the following main program to test your classes if you wish include <iostream> #include <iomanip> include savingsAccount.h #include checkingAccount.h using namespace stó int main int accountNumber 1000; checkingAccount jackAccount(accountNumber++,1000); checkingAccount lisaAccount(accountNumber++, 450); savingsAccount samirAccountíaccountNumber++, 9300) savingsAccount ritaAccount(accountNumber++, 32); jackAccount.deposit(1000); lisaAccount.deposit(2300); samirAccount.deposit(S00); ritaAccount.deposit(500) jackAccount postInterest0 lisaAccount.postInterest samirAccount postInterest0 ritaAccount postInterestO: jackAccount.printo lisaAccount.print0: samirAccount.print0; ritaAccount printo; jackAccount writeCheck(250); lisaAccount.writeCheck (350); samirAccount.withdraw(120); ritaAccount.withdraw(290); cout< After withdrawals***s*s**endl; jackAccount.printo lisaAccount.print0: samirAccount.print0; ritaAccount printo; return 0; 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.