Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This lab introduces you to writing a C++ program to implement the concept of cla

ID: 1812057 • Letter: T

Question

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.

VERY IMPORTANT :: ALL STEPS 1 THRU 4 SHOULD BE COMPLETED THANK YOU

PLEASE MAKE SURE IT COMPILES USING STUDIO 2012



Deliverables



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.



to the Dropbox for Week 3.






program accomplishes, including its input, key processes, and output.



used to confirm that your program worked properly. If necessary, include a

clearly labeled table with test cases, predicted results, and actual

results.



of what the lab demonstrated and any conclusions drawn from the testing of the

lab program.



access specifiers, data types, and function arguments.



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









i L A B S T E P S





STEP 1: Create the Multifile Project and the

Main (Base) Class



Create a new project that consists of the base class

BankAccount.



The BankAccount class should contain, at minimum, the following

members.


account number. These should be of different and appropriate data types.












STEP 2: Create the CheckingAccount Class

Derived From the BankAccount Class



The class CheckingAccount should contain, at a minimum, the

following members.


transactions made on the account. Whenever a withdrawal is made, this number

should be incremented.



deduct transaction fees from an account using the following guidelines.



withdrawal transaction past the three free transactions, there will be a service

fee of 50 cents per transaction. The service fee should be deducted from the

account balance at the time the transaction is made.


withdrawal plus the service fee, the withdrawal should be denied.


transaction succeeded or failed. Transaction fees should be deducted only from

successful transactions, but the transaction count should be incremented in

either case.





STEP 3: Create the SavingsingAccount Class

Derived From the BankAccount Class



The class CheckingAccount should contain, at a minimum, the

following members.


rate. The daily interest rate can be calculated from a yearly interest rate by

dividing the annual rate by 365.


days since the last transaction or balance inquiry. This should be updated using

a random-number generator (reference Lab 1) that will return a value

representing the number of days between 0 and 7, inclusive. We will assume that

this bank is open every day of the year.


since the last transaction or balance inquiry.


rate.


deposit operations for the savings account.


calculating and adding interest to the account based on the daily interest rate,

the current balance of the account, and the number of days since the last

balance inquiry. This should be called only when a balance inquiry is made, not

when a deposit or withdrawal transaction or an account number inquiry is made.



a withdrawal, the withdrawal should be denied. The number of days since the last

transaction or balance inquiry and the interest calculations should still be

made.


transaction succeeded or failed.


earned since the last transaction or balance inquiry.


days since the last transaction or balance inquiry.





STEP 4: Test Program Operation



the function main() test program.



with initial balances of $100 each using the functions defined in the class

definitions. The test program should also assign a unique, five-digit account

number to each account and assign an annual interest rate of 3% for the savings

account.



which option is to be performed on which account, including the following.



account.



the updated balance and any fees charged or interest earned should also be

displayed.


displayed.



type.






Lab Questions



Please answer all the lab questions in the text file that is to

be turned into the Dropbox. You are not required to copy the question text into

your document, but all answers should be listed with the question number

they answer.


classes? If so, list which class and which function, and explain why they were

either called or overloaded.



If so, list which class and function, and explain why this was done.



base class? Why was this access attribute chosen?







Explanation / Answer

ANSWER


Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote