bool CheckingAccount::withdrawMoney(double amount) { bool status; if(numberOfWit
ID: 3658921 • Letter: B
Question
bool CheckingAccount::withdrawMoney(double amount) { bool status; if(numberOfWithdrawls>3) { amount=amount+.50; } status=BankAccount::withdrawMoney(amount); numberOfWithdrawls++; return status; } //end bool CheckingAccount::withdrawMoney(double amount) Question: What is amount in CheckingAccount::withdrawMoney function.Explanation / Answer
1. bool CheckingAccount::withdrawMoney(double amount) { 2. bool status; 3. if(numberOfWithdrawls>3) { 4. amount=amount+.50; 5. } 6. status=BankAccount::withdrawMoney(amount); 7. numberOfWithdrawls++; 8. return status; 9. } /*end bool CheckingAccount::withdrawMoney(double amount) Question: What is amount in CheckingAccount::withdrawMoney function. */ Line 1 -> bool is return type of function withdraw money. Which header is given in class name CheckingAccount. Line 2 -> status is avariable of type bool line 3 , line 4 , lin 5 are easy. I hope you understand it line 6 -> here status are being used to get it's value from class name BankAccount from function withdrawmoney. And amount is the parameter of function withdrawmoney. Line 7 -> Increamenting the number of withdraw line 8 -- > returning the status of type bool // it will mainly be like (true or false string output) Noote :: If you have any query feel free to contact me : Thanks :)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.