COMP 220 COMP220 COMP/220 Week 3 Lab Inheritance – Southern Alberta Institute of Technology (SAIT)
DOWNLOAD SOLUTION https://www.solvedcollegepapers.com/product/comp-220-comp220-comp-220-ait/ 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.
Category: Assignments Help Experts Tags: COMP 220 COMP220 COMP/220 Computer Fundamentals - Southern Alberta Institute of Technology (SAIT), COMP 220 Week 1 Lab TwoDimensional Arrays, COMP 220 Week 2 Lab Classes Objects and Encapsulation, COMP 220 Week 3 Lab Inheritance, COMP 220 Week 4 Lab Composition, COMP 220 Week 5 Lab Pointers and Pointer Operations, COMP 220 Week 6 Lab Overloaded Operators, COMP 220 Week 7 Lab Polymorphism, COMP 220comp220 lab 7, comp220 week 7, comp220 week 7 ilab
Description
Description
COMP 220 Week 3 Lab Inheritance – Southern Alberta Institute of Technology (SAIT) 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: Include a 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. 2. 3. 4. 5.
the formatting of your source code; the use of meaningful identifiers; the extent of internal documentation; the degree to which an exercises’ specifications are met; and 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: o set the account number; o return the account number; o return the account balance; o deposit money into the account; and o 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. o 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. o If there are insufficient funds in the account balance to cover the withdrawal plus the service fee, the withdrawal should be denied. o 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. 4. Make a deposit and specify the amount to a selected or an entered account. 5. Make a withdrawal and specify the amount to a selected or an entered account. 6. Return the balance of a selected or an entered account. o For deposit transactions, withdrawal transactions, and balance inquiries, the updated balance and any fees charged or interest earned should also be displayed. o For the savings account, the number of days since last transaction should be displayed. 7. Exit the program. 8. 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? Download Full Course Solution: BUS 303 Human Resource Management Entire Course Help https://www.solvedcollegepapers.com/product/bus-303-human-resource-managemententire-course-help/ BUS 303 Human Resource Management Entire Course Help> Ashford University Bus 303 Human Resource Management Week 1 Quiz 1.docx Bus 303 Human Resource Management Week 1 Quiz 1.docx BUS 303 – Fall 2018 Bus 303 Human Resource Management Week 1 Quiz 1.docx 5 pages BUS 303 Week 1 quiz.docx Download Full Course Solution: POL 255-Entire course Help: Ashford University https://www.solvedcollegepapers.com/product/pol-255-entire-course-help-ashforduniversity/ POL 255 Entire Course NEW POL 255 Week 1 Assignment Theory, Arms Races, and the Prisoner’s Dilemma NEW (2 Sets) POL 255 Week 1 Discussion IR Theories Strengths and Weaknesses NEW POL 255 Week 1 Quiz NEW POL 255 Week 2 Assignment Levels of Analysis and the Crisis in Syria NEW POL 255 Week 2 Discussion Communicating National Interests NEW POL 255 Week 2 Quiz NEW POL 255 Week 3 Assignment Moral and Ethical Dilemmas from America’s Use of Drones NEW POL 255 Week 3 Discussion The Contemporary International System NEW
POL 255 Week 3 Quiz NEW POL 255 Week 4 Assignment Easter Island Full of Mystery NEW POL 255 Week 4 DQ NEW POL 255 Week 5 DQ NEW
Download Full Course Solution: PSY 215 PSY215 PSY/215 Module Two Milestone. Shaina Dado.docx https://www.solvedcollegepapers.com/product/psy-215-psy215-psy-215-dado/ According to the findings of the Pew Research study, there are several potential costs and benefits that result from frequent exposure to social media. oDescribe one psychological benefitof frequent social media use. Social media usage can have several effects on us whether it be bad or beneficial. We use social media as a way to connect with others. Living alone after moving to a new place can be overwhelming and can make you feel lonely. Being able to connect with your loved ones, old colleagues and family through social media can help you rememberthat you aren’t alone. Seeing how others are doing through their posted photos or even through what they post can make you feel like you aren’t missing out on much. oDescribe one psychological costof frequent social media use. As there are positives to social media use, there are some costs that come with it. The frequent need for attention can become a cost when it comes to social media. Download Full Course Solution: [New Answers]-Full course CMIT-200: Relational Database Design and SQL https://www.solvedcollegepapers.com/product/cmit-200-relational-database-design-andsql/ Course Description and Prerequisites A relational database management system (RDBMS) is the heart of most modern information systems. This is a survey course in relational database design, development, and implementation. The course covers key concepts of database design using entity relationship diagrams (ERDs), normalization, and functional dependence. Logical and physical schemas and the use of Structured Query Language (SQL) to query data will be studied in depth. Student learning is reinforced through discussions and hands-on laboratory assignments. Students will complete a relational database project by using a relational database management system. This course is intended for anyone who is involved in designing, developing, or implementing relational database management systems (e.g., users, IT managers, technical staff, and other IT team members). Prerequisite: CMIT-135
Student-Centered Learning Outcomes
Design a relational database using entity relationship diagrams and SQL Normalize relational database tables through third normal form (3NF) Differentiate between conceptual, logical, and physical database designs Specify different types of relationships between database entities and objects Physically create databases using SQL Data Definition Language (DDL) Query databases using SQL Data Manipulation Language (DML)