i L A B O V E R V I E W Scenario and Summary This lab introduces you to writing
ID: 3527012 • Letter: I
Question
i L A B O V E R V I E W Scenario and Summary This lab introduces you to writing a C++ program to implement the concept of class inheritance using different types of bank accounts as a model. In this lab, you will create a base class, called CBankAccount, and two additional classes (each derived from CBankAccount), called CSavingsAccount and CCheckingAccount. You will then test the operations of each class in function main() to simulate the transactions of both a checking account and a savings account. Deliverables Submit a single Notepad file containing the source code for all the files of the lab to the Dropbox for Week 3. Your source code should use proper indentation and be error free. Be sure that your last name and the lab number are part of the file name: for example, YourLastName_Lab3.txt. Each program should include a comment section that includes (minimally) your name, the lab and exercise number, and a description of what the program accomplishes. Submit a lab report (a Word document) containing the following information to the Dropbox for Week 3. Include your name and the lab or lab-exercise number. Specification: Include a brief description of what the program accomplishes, including its input, key processes, and output. Test Plan: Include a brief description of the method you used to confirm that your program worked properly. If necessary, include a clearly labeled table with test cases, predicted results, and actual results. Summary and Conclusions: Include a summary of what the lab demonstrated and any conclusions drawn from the testing of the lab program. Provide a UML diagram showing the base and the derived class relationships, access specifiers, data types, and function arguments. Answers to Lab Questions: Answer any and all of the lab questions included in the lab steps. Summary: Write a statement summarizing your predicted and actual output. Identify and explain any differences. Conclusions: Write at least one nontrivial paragraph that explains, in detail, either a significant problem you had and how you solved it or, if you had no significant problems, something you learned by doing the exercise. Each lab exercise should have a separate section in the lab-report document. Your lab grade is based upon the formatting of your source code; the use of meaningful identifiers; the extent of internal documentation; the degree to which an exercisesExplanation / Answer
class CBankAccount { float a_no; float a_bal; float withdraw; public : float set_Account(float no) { this->a_no=no; } float get_Account() { return this->a_no; } float get_amount() { return this->a_bal; } float deposit(float money) { this->a_bal=this->a_bal+money; return 1.0; } float withdraw(float money) { if(moneya_bal) this->a_bal=this->bal-money; else coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.