SlideShare ist ein Scribd-Unternehmen logo
1 von 4
Please click here to get complete lab
Or go to following address
http://homeworkfox.com/tutorials/computer-
science/4604/comp-220-week-3-ilab-3-of-7-inheritance/
 iLAB OVERVIEW
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


To get complete lab go to following address
http://homeworkfox.com/tutorials/computer-science/4604/comp-220-week-3-ilab-3-of-7-inheritance/
Please click here to get complete lab
Or go to following address
http://homeworkfox.com/tutorials/computer-
science/4604/comp-220-week-3-ilab-3-of-7-inheritance/
   5. the completeness of your lab report.

 iLAB STEPS

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

To get complete lab go to following address
http://homeworkfox.com/tutorials/computer-science/4604/comp-220-week-3-ilab-3-of-7-inheritance/
Please click here to get complete lab
Or go to following address
http://homeworkfox.com/tutorials/computer-
science/4604/comp-220-week-3-ilab-3-of-7-inheritance/
         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.



To get complete lab go to following address
http://homeworkfox.com/tutorials/computer-science/4604/comp-220-week-3-ilab-3-of-7-inheritance/
Please click here to get complete lab
Or go to following address
http://homeworkfox.com/tutorials/computer-
science/4604/comp-220-week-3-ilab-3-of-7-inheritance/
   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?




To get complete lab go to following address
http://homeworkfox.com/tutorials/computer-science/4604/comp-220-week-3-ilab-3-of-7-inheritance/

Weitere ähnliche Inhalte

Andere mochten auch

Performance indicators for different levels of management
Performance indicators for different levels of managementPerformance indicators for different levels of management
Performance indicators for different levels of managementsree431
 
Collaborative Composition Histories
Collaborative Composition HistoriesCollaborative Composition Histories
Collaborative Composition Historiesmdbabin
 
Performance indicators for different levels of management
Performance indicators for different levels of managementPerformance indicators for different levels of management
Performance indicators for different levels of managementsree431
 
Závěrečný úkol KPI
Závěrečný úkol KPIZávěrečný úkol KPI
Závěrečný úkol KPIJan Vyhnánek
 
Venture Lab Creativity: Paying Attention
Venture Lab Creativity: Paying Attention Venture Lab Creativity: Paying Attention
Venture Lab Creativity: Paying Attention ethelkatrina
 
Beat the Red Eye - 100+ IDEAS!
Beat the Red Eye - 100+ IDEAS!Beat the Red Eye - 100+ IDEAS!
Beat the Red Eye - 100+ IDEAS!ethelkatrina
 
Can You Trust Your Tests? (Agile Tour 2015 Kaunas)
Can You Trust Your Tests? (Agile Tour 2015 Kaunas)Can You Trust Your Tests? (Agile Tour 2015 Kaunas)
Can You Trust Your Tests? (Agile Tour 2015 Kaunas)Vaidas Pilkauskas
 
CIS 247C iLab 4 of 7: Composition and Class Interfaces
CIS 247C iLab 4 of 7: Composition and Class Interfaces  CIS 247C iLab 4 of 7: Composition and Class Interfaces
CIS 247C iLab 4 of 7: Composition and Class Interfaces HomeWork-Fox
 
London Sightseeing Tour Places of interest
London Sightseeing Tour Places of interestLondon Sightseeing Tour Places of interest
London Sightseeing Tour Places of interestkultbag31
 
Mahindra & Mahindra Tractors In Usa
Mahindra & Mahindra Tractors In UsaMahindra & Mahindra Tractors In Usa
Mahindra & Mahindra Tractors In UsaANSHU TIWARI
 
A product demonstration
A product demonstrationA product demonstration
A product demonstrationANSHU TIWARI
 

Andere mochten auch (18)

Performance indicators for different levels of management
Performance indicators for different levels of managementPerformance indicators for different levels of management
Performance indicators for different levels of management
 
Time management
Time managementTime management
Time management
 
Collaborative Composition Histories
Collaborative Composition HistoriesCollaborative Composition Histories
Collaborative Composition Histories
 
Performance indicators for different levels of management
Performance indicators for different levels of managementPerformance indicators for different levels of management
Performance indicators for different levels of management
 
Závěrečný úkol KPI
Závěrečný úkol KPIZávěrečný úkol KPI
Závěrečný úkol KPI
 
Croutons.org
Croutons.orgCroutons.org
Croutons.org
 
Coderetreat introduction
Coderetreat introductionCoderetreat introduction
Coderetreat introduction
 
norhane ramdani
norhane ramdaninorhane ramdani
norhane ramdani
 
Group 8. part a
Group 8. part aGroup 8. part a
Group 8. part a
 
Venture Lab Creativity: Paying Attention
Venture Lab Creativity: Paying Attention Venture Lab Creativity: Paying Attention
Venture Lab Creativity: Paying Attention
 
Beat the Red Eye - 100+ IDEAS!
Beat the Red Eye - 100+ IDEAS!Beat the Red Eye - 100+ IDEAS!
Beat the Red Eye - 100+ IDEAS!
 
Can You Trust Your Tests? (Agile Tour 2015 Kaunas)
Can You Trust Your Tests? (Agile Tour 2015 Kaunas)Can You Trust Your Tests? (Agile Tour 2015 Kaunas)
Can You Trust Your Tests? (Agile Tour 2015 Kaunas)
 
CIS 247C iLab 4 of 7: Composition and Class Interfaces
CIS 247C iLab 4 of 7: Composition and Class Interfaces  CIS 247C iLab 4 of 7: Composition and Class Interfaces
CIS 247C iLab 4 of 7: Composition and Class Interfaces
 
London Sightseeing Tour Places of interest
London Sightseeing Tour Places of interestLondon Sightseeing Tour Places of interest
London Sightseeing Tour Places of interest
 
Akka Unit Testing
Akka Unit TestingAkka Unit Testing
Akka Unit Testing
 
Negotiation fundamentals
Negotiation fundamentalsNegotiation fundamentals
Negotiation fundamentals
 
Mahindra & Mahindra Tractors In Usa
Mahindra & Mahindra Tractors In UsaMahindra & Mahindra Tractors In Usa
Mahindra & Mahindra Tractors In Usa
 
A product demonstration
A product demonstrationA product demonstration
A product demonstration
 

Ähnlich wie Comp 220 lab 3

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
 
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
 
Devry acct 251 week 6 quiz
Devry acct 251 week 6 quizDevry acct 251 week 6 quiz
Devry acct 251 week 6 quizjody zoll
 
Comp 220 ilab 6 of 7
Comp 220 ilab 6 of 7Comp 220 ilab 6 of 7
Comp 220 ilab 6 of 7ashhadiqbal
 
Counting -cycle_count_using_mobile_application
Counting  -cycle_count_using_mobile_applicationCounting  -cycle_count_using_mobile_application
Counting -cycle_count_using_mobile_applicationmanitenkasi
 
ACCT 326 WRITING ASSIGNMENT #2 OVERVIEW OF PROJECT
ACCT 326 WRITING ASSIGNMENT #2 OVERVIEW OF PROJECTACCT 326 WRITING ASSIGNMENT #2 OVERVIEW OF PROJECT
ACCT 326 WRITING ASSIGNMENT #2 OVERVIEW OF PROJECTMalcolmJerry
 
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
 
Microsoft az-204 download free demo at dumps cafe
Microsoft az-204 download free demo at dumps cafeMicrosoft az-204 download free demo at dumps cafe
Microsoft az-204 download free demo at dumps cafeJeannieHeldt
 
Ac 107 Social Responsibility / tutorialrank.com
Ac 107 Social Responsibility / tutorialrank.comAc 107 Social Responsibility / tutorialrank.com
Ac 107 Social Responsibility / tutorialrank.comPrescottLunt431
 
7200342 cognos-report-studio
7200342 cognos-report-studio7200342 cognos-report-studio
7200342 cognos-report-studiosarovar1
 
1 Student Name Submission Date DBST 667 .docx
1 Student Name   Submission Date   DBST 667 .docx1 Student Name   Submission Date   DBST 667 .docx
1 Student Name Submission Date DBST 667 .docxmonicafrancis71118
 
FIN 550 help Successful Learning/Snaptutorial
FIN 550 help Successful Learning/SnaptutorialFIN 550 help Successful Learning/Snaptutorial
FIN 550 help Successful Learning/Snaptutorialwilliamtrumpz2M
 
Cmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comCmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comStephenson22
 

Ähnlich wie Comp 220 lab 3 (13)

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
 
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
 
Devry acct 251 week 6 quiz
Devry acct 251 week 6 quizDevry acct 251 week 6 quiz
Devry acct 251 week 6 quiz
 
Comp 220 ilab 6 of 7
Comp 220 ilab 6 of 7Comp 220 ilab 6 of 7
Comp 220 ilab 6 of 7
 
Counting -cycle_count_using_mobile_application
Counting  -cycle_count_using_mobile_applicationCounting  -cycle_count_using_mobile_application
Counting -cycle_count_using_mobile_application
 
ACCT 326 WRITING ASSIGNMENT #2 OVERVIEW OF PROJECT
ACCT 326 WRITING ASSIGNMENT #2 OVERVIEW OF PROJECTACCT 326 WRITING ASSIGNMENT #2 OVERVIEW OF PROJECT
ACCT 326 WRITING ASSIGNMENT #2 OVERVIEW OF PROJECT
 
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
 
Microsoft az-204 download free demo at dumps cafe
Microsoft az-204 download free demo at dumps cafeMicrosoft az-204 download free demo at dumps cafe
Microsoft az-204 download free demo at dumps cafe
 
Ac 107 Social Responsibility / tutorialrank.com
Ac 107 Social Responsibility / tutorialrank.comAc 107 Social Responsibility / tutorialrank.com
Ac 107 Social Responsibility / tutorialrank.com
 
7200342 cognos-report-studio
7200342 cognos-report-studio7200342 cognos-report-studio
7200342 cognos-report-studio
 
1 Student Name Submission Date DBST 667 .docx
1 Student Name   Submission Date   DBST 667 .docx1 Student Name   Submission Date   DBST 667 .docx
1 Student Name Submission Date DBST 667 .docx
 
FIN 550 help Successful Learning/Snaptutorial
FIN 550 help Successful Learning/SnaptutorialFIN 550 help Successful Learning/Snaptutorial
FIN 550 help Successful Learning/Snaptutorial
 
Cmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comCmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.com
 

Kürzlich hochgeladen

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 

Kürzlich hochgeladen (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 

Comp 220 lab 3

  • 1. Please click here to get complete lab Or go to following address http://homeworkfox.com/tutorials/computer- science/4604/comp-220-week-3-ilab-3-of-7-inheritance/ iLAB OVERVIEW 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 To get complete lab go to following address http://homeworkfox.com/tutorials/computer-science/4604/comp-220-week-3-ilab-3-of-7-inheritance/
  • 2. Please click here to get complete lab Or go to following address http://homeworkfox.com/tutorials/computer- science/4604/comp-220-week-3-ilab-3-of-7-inheritance/ 5. the completeness of your lab report. iLAB STEPS 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 To get complete lab go to following address http://homeworkfox.com/tutorials/computer-science/4604/comp-220-week-3-ilab-3-of-7-inheritance/
  • 3. Please click here to get complete lab Or go to following address http://homeworkfox.com/tutorials/computer- science/4604/comp-220-week-3-ilab-3-of-7-inheritance/ 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. To get complete lab go to following address http://homeworkfox.com/tutorials/computer-science/4604/comp-220-week-3-ilab-3-of-7-inheritance/
  • 4. Please click here to get complete lab Or go to following address http://homeworkfox.com/tutorials/computer- science/4604/comp-220-week-3-ilab-3-of-7-inheritance/ 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? To get complete lab go to following address http://homeworkfox.com/tutorials/computer-science/4604/comp-220-week-3-ilab-3-of-7-inheritance/