SlideShare uma empresa Scribd logo
1 de 4
SOLUTIONJUG.COM
COMP/220 iLab 3 of 7 - C++ Course
CLICK HERE TO GET THE SOLUTION !!!!!!!!
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
1. 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.
2. Submit a lab report (a Word document) containing the following information to the
Dropbox for Week 3.
o Include your name and the lab or lab-exercise number.
o Specification: Include a brief description of what the program accomplishes, including its
input, key processes, and output.
o 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.
o Summary and Conclusions: Includea summary of what the lab demonstrated and any
conclusions drawn from the testing of the lab program.
o Provide a UML diagram showing the base and the derived class relationships, access
specifiers, data types, and function arguments.
o 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
1. the formatting of your source code;
2. the use of meaningful identifiers;
3. the extent of internal documentation;
4. the degree to which an exercises’ specifications are met; and
5. the completeness of your lab report.
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.
1. It should contain data members to store a bank customer's balance and account number.
These should be of different and appropriate data types.
2. It should have function members that do the following:
a. set the account number;
b. return the account number;
c. return the account balance;
d. deposit money into the account; and
e. withdraw money from the account.
STEP 2: Create the CheckingAccount Class Derived From the BankAccount Class
The class CheckingAccount should contain, at a minimum, the following members.
1. It should contain a data member to keep track of the number of withdrawal transactions
made on the account. Whenever a withdrawal is made, this number should be incremented.
2. Override the base class, withdraw-money function, and add the capability to deduct
transaction fees from an account using the following guidelines.
a. The checking account is allowed three free transactions. For each successful 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.
b. If there are insufficient funds in the account balance to cover the withdrawal plus the
service fee, the withdrawal should be denied.
c. The function should return a value to indicate whether the 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.
1. It should contain a data member to hold the daily interest rate. The daily interest rate can
be calculated from a yearly interest rate by dividing the annual rate by 365.
2. It should contain a data member to keep track of the number of 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.
3. It should contain a data member to hold the interest earned since the last transaction or
balance inquiry.
4. It should contain a function member to set the annual interest rate.
5. Utilize the base-class functions for both withdrawal and deposit operations for the savings
account.
6. Override the base-class-balance inquiry function to add 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.
7. If there are insufficient funds in the account balance to cover 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.
8. A value should be returned to indicate whether a withdrawal transaction succeeded or
failed.
9. It should contain a function member to return the interest earned since the last
transaction or balance inquiry.
10. It should contain a function member to return the number of days since the last
transaction or balance inquiry.
STEP 4: Test Program Operation
1. All data-input and data-display operations (cin and cout) should be done in the function
main() test program.
2. The test program should create one checking account and one savings account 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.
3. The test program should then display a menu that allows the user to select which option
is to be performed on which account, including the following.
a. Make a deposit and specify the amount to a selected or an entered account.
b. Make a withdrawal and specify the amount to a selected or an entered account.
c. Return the balance of a selected or an entered account.
i. For deposit transactions, withdrawal transactions, and balance inquiries, the updated
balance and any fees charged or interest earned should also be displayed.
ii. For the savings account, the number of days since last transaction should be displayed.
d. Exit the program.
4. Each account operation should display the account number and the account 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.
1. Were any base-class functions called or overloaded in either of the derived classes? If so,
list which class and which function, and explain why they were either called or overloaded.
2. Were any derived-class functions not explicitly called by the test program? If so, list which
class and function, and explain why this was done.
3. Which access attribute was used for each of the classes derived from the base class? Why
was this access attribute chosen?
CLICK HERE TO GET THE SOLUTION !!!!!!!!
Comp 220 ilab 3 of 7

Mais conteúdo relacionado

Destaque

Destaque (8)

Garantias 1
Garantias 1Garantias 1
Garantias 1
 
Arrendamiento
ArrendamientoArrendamiento
Arrendamiento
 
Harry Hajiyerou resume
Harry Hajiyerou resumeHarry Hajiyerou resume
Harry Hajiyerou resume
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7
 
17 ley regimen prop condominio
17 ley regimen prop condominio17 ley regimen prop condominio
17 ley regimen prop condominio
 
Ejemplo de proyecto de vida
Ejemplo de proyecto de vidaEjemplo de proyecto de vida
Ejemplo de proyecto de vida
 
MI PROYECTO DE VIDA EN WORD
MI PROYECTO DE VIDA EN WORDMI PROYECTO DE VIDA EN WORD
MI PROYECTO DE VIDA EN WORD
 
Proyecto de vida paola terminado
Proyecto de vida paola terminadoProyecto de vida paola terminado
Proyecto de vida paola terminado
 

Semelhante a Comp 220 ilab 3 of 7

Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docxStudent Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docxemelyvalg9
 
Comp 220 ilab 6 of 7
Comp 220 ilab 6 of 7Comp 220 ilab 6 of 7
Comp 220 ilab 6 of 7ashhadiqbal
 
Devry acct 251 week 6 quiz
Devry acct 251 week 6 quizDevry acct 251 week 6 quiz
Devry acct 251 week 6 quizjody zoll
 
11 g time serices
11 g time serices11 g time serices
11 g time sericesmuralikoti
 
7200342 cognos-report-studio
7200342 cognos-report-studio7200342 cognos-report-studio
7200342 cognos-report-studiosarovar1
 
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docxCASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docxketurahhazelhurst
 
Exam view dynamic recalculation files
Exam view dynamic recalculation filesExam view dynamic recalculation files
Exam view dynamic recalculation filesWilliam McIntosh
 
Counting -cycle_count_using_mobile_application
Counting  -cycle_count_using_mobile_applicationCounting  -cycle_count_using_mobile_application
Counting -cycle_count_using_mobile_applicationmanitenkasi
 
ENGR 131 Elementary Computer ProgrammingTeam IN – Instructor
ENGR 131  Elementary Computer ProgrammingTeam IN – InstructorENGR 131  Elementary Computer ProgrammingTeam IN – Instructor
ENGR 131 Elementary Computer ProgrammingTeam IN – InstructorTanaMaeskm
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEWshyamuopeight
 
Administrative InformationDate AssignedSaturday, March 30, 2.docx
Administrative InformationDate AssignedSaturday, March 30, 2.docxAdministrative InformationDate AssignedSaturday, March 30, 2.docx
Administrative InformationDate AssignedSaturday, March 30, 2.docxcoubroughcosta
 
Cmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comCmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comStephenson22
 
Cmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comCmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comWilliamsTaylorza48
 

Semelhante a Comp 220 ilab 3 of 7 (15)

Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docxStudent Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
 
Comp 220 ilab 6 of 7
Comp 220 ilab 6 of 7Comp 220 ilab 6 of 7
Comp 220 ilab 6 of 7
 
Devry acct 251 week 6 quiz
Devry acct 251 week 6 quizDevry acct 251 week 6 quiz
Devry acct 251 week 6 quiz
 
11 g time serices
11 g time serices11 g time serices
11 g time serices
 
7200342 cognos-report-studio
7200342 cognos-report-studio7200342 cognos-report-studio
7200342 cognos-report-studio
 
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docxCASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
 
Lab5 RTC reports and Dashboards
Lab5 RTC reports and DashboardsLab5 RTC reports and Dashboards
Lab5 RTC reports and Dashboards
 
Exam view dynamic recalculation files
Exam view dynamic recalculation filesExam view dynamic recalculation files
Exam view dynamic recalculation files
 
Counting -cycle_count_using_mobile_application
Counting  -cycle_count_using_mobile_applicationCounting  -cycle_count_using_mobile_application
Counting -cycle_count_using_mobile_application
 
ENGR 131 Elementary Computer ProgrammingTeam IN – Instructor
ENGR 131  Elementary Computer ProgrammingTeam IN – InstructorENGR 131  Elementary Computer ProgrammingTeam IN – Instructor
ENGR 131 Elementary Computer ProgrammingTeam IN – Instructor
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
 
Hpalm
HpalmHpalm
Hpalm
 
Administrative InformationDate AssignedSaturday, March 30, 2.docx
Administrative InformationDate AssignedSaturday, March 30, 2.docxAdministrative InformationDate AssignedSaturday, March 30, 2.docx
Administrative InformationDate AssignedSaturday, March 30, 2.docx
 
Cmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comCmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.com
 
Cmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comCmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.com
 

Último

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Último (20)

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Comp 220 ilab 3 of 7

  • 1. SOLUTIONJUG.COM COMP/220 iLab 3 of 7 - C++ Course CLICK HERE TO GET THE SOLUTION !!!!!!!! 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 1. 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. 2. Submit a lab report (a Word document) containing the following information to the Dropbox for Week 3. o Include your name and the lab or lab-exercise number. o Specification: Include a brief description of what the program accomplishes, including its input, key processes, and output. o 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. o Summary and Conclusions: Includea summary of what the lab demonstrated and any conclusions drawn from the testing of the lab program. o Provide a UML diagram showing the base and the derived class relationships, access specifiers, data types, and function arguments. o 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.
  • 2. Your lab grade is based upon 1. the formatting of your source code; 2. the use of meaningful identifiers; 3. the extent of internal documentation; 4. the degree to which an exercises’ specifications are met; and 5. the completeness of your lab report. 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. 1. It should contain data members to store a bank customer's balance and account number. These should be of different and appropriate data types. 2. It should have function members that do the following: a. set the account number; b. return the account number; c. return the account balance; d. deposit money into the account; and e. withdraw money from the account. STEP 2: Create the CheckingAccount Class Derived From the BankAccount Class The class CheckingAccount should contain, at a minimum, the following members. 1. It should contain a data member to keep track of the number of withdrawal transactions made on the account. Whenever a withdrawal is made, this number should be incremented. 2. Override the base class, withdraw-money function, and add the capability to deduct transaction fees from an account using the following guidelines. a. The checking account is allowed three free transactions. For each successful 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. b. If there are insufficient funds in the account balance to cover the withdrawal plus the service fee, the withdrawal should be denied. c. The function should return a value to indicate whether the 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. 1. It should contain a data member to hold the daily interest rate. The daily interest rate can be calculated from a yearly interest rate by dividing the annual rate by 365. 2. It should contain a data member to keep track of the number of 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. 3. It should contain a data member to hold the interest earned since the last transaction or balance inquiry. 4. It should contain a function member to set the annual interest rate.
  • 3. 5. Utilize the base-class functions for both withdrawal and deposit operations for the savings account. 6. Override the base-class-balance inquiry function to add 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. 7. If there are insufficient funds in the account balance to cover 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. 8. A value should be returned to indicate whether a withdrawal transaction succeeded or failed. 9. It should contain a function member to return the interest earned since the last transaction or balance inquiry. 10. It should contain a function member to return the number of days since the last transaction or balance inquiry. STEP 4: Test Program Operation 1. All data-input and data-display operations (cin and cout) should be done in the function main() test program. 2. The test program should create one checking account and one savings account 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. 3. The test program should then display a menu that allows the user to select which option is to be performed on which account, including the following. a. Make a deposit and specify the amount to a selected or an entered account. b. Make a withdrawal and specify the amount to a selected or an entered account. c. Return the balance of a selected or an entered account. i. For deposit transactions, withdrawal transactions, and balance inquiries, the updated balance and any fees charged or interest earned should also be displayed. ii. For the savings account, the number of days since last transaction should be displayed. d. Exit the program. 4. Each account operation should display the account number and the account 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. 1. Were any base-class functions called or overloaded in either of the derived classes? If so, list which class and which function, and explain why they were either called or overloaded. 2. Were any derived-class functions not explicitly called by the test program? If so, list which class and function, and explain why this was done. 3. Which access attribute was used for each of the classes derived from the base class? Why was this access attribute chosen? CLICK HERE TO GET THE SOLUTION !!!!!!!!