Submit a lab report | Computer Science homework help

  

1. Submit a lab report (a Word document) containing the following information.

·  

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.

 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:

1. set the account number;

2. return the account number;

3. return the account balance;

4. deposit money into the account; and

5. withdraw money from the account.

 

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.

1. 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.

2. If there are insufficient funds in the account balance to cover the withdrawal plus the service fee, the withdrawal should be denied.

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.
 

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.

1. It should contain a function member to return the number of days since the last transaction or balance inquiry.
 

ll 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.

1. Make a deposit and specify the amount to a selected or an entered account.

2. Make a withdrawal and specify the amount to a selected or an entered account.

3. Return the balance of a selected or an entered account.

1. For deposit transactions, withdrawal transactions, and balance inquiries, the updated balance and any fees charged or interest earned should also be displayed.

2. For the savings account, the number of days since last transaction should be displayed.

4. Exit the program.

Each account operation should display the account number and the account type.

 

Calculate the price of your order

Select your paper details and see how much our professional writing services will cost.

We`ll send you the first draft for approval by at
Price: $36
  • Freebies
  • Format
  • Formatting (MLA, APA, Chicago, custom, etc.)
  • Title page & bibliography
  • 24/7 customer support
  • Amendments to your paper when they are needed
  • Chat with your writer
  • 275 word/double-spaced page
  • 12 point Arial/Times New Roman
  • Double, single, and custom spacing
  • We care about originality

    Our custom human-written papers from top essay writers are always free from plagiarism.

  • We protect your privacy

    Your data and payment info stay secured every time you get our help from an essay writer.

  • You control your money

    Your money is safe with us. If your plans change, you can get it sent back to your card.

How it works

  1. 1
    You give us the details
    Complete a brief order form to tell us what kind of paper you need.
  2. 2
    We find you a top writer
    One of the best experts in your discipline starts working on your essay.
  3. 3
    You get the paper done
    Enjoy writing that meets your demands and high academic standards!

Samples from our advanced writers

Check out some essay pieces from our best essay writers before your place an order. They will help you better understand what our service can do for you.

Get your own paper from top experts

Order now

Perks of our essay writing service

We offer more than just hand-crafted papers customized for you. Here are more of our greatest perks.

  • Swift delivery
    Our writing service can deliver your short and urgent papers in just 4 hours!
  • Professional touch
    We find you a pro writer who knows all the ins and outs of your subject.
  • Easy order placing/tracking
    Create a new order and check on its progress at any time in your dashboard.
  • Help with any kind of paper
    Need a PhD thesis, research project, or a two-page essay? For you, we can do it all.
  • Experts in 80+ subjects
    Our pro writers can help you with anything, from nursing to business studies.
  • Calculations and code
    We also do math, write code, and solve problems in 30+ STEM disciplines.

Frequently asked questions

Get instant answers to the questions that students ask most often.

See full FAQ
    See full FAQ

    Take your studies to the next level with our experienced specialists

    WhatsApp
    Hello, Send us a message or inquiry, and we will respond right away